Development

Changeset 4042

You must first sign up to be able to contribute.

Changeset 4042

Show
Ignore:
Timestamp:
05/19/07 01:32:43 (1 year ago)
Author:
Jonathan.Wage
Message:

sfCollapsibleContentPlugin: Added helpers and documentation examples to README.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfCollapsibleContentPlugin/README

    r4040 r4042  
    11=== Symfony Collapsible Content Plugin === 
    22 
     3Simple example 
     4{{{ 
     5<?php 
     6$contentId = 'id_of_content'; // must be unique. Used for remembering the collapsed state of content 
     7 
     8// This is using the classes directly 
     9// echo out a (+/-) icon that controlls the collapsed status of the content 
     10echo sfCollapsibleContent::getWrapperController($contentId); 
     11 
     12// wrap your content with the plugin so the controller can communicate to it 
     13sfCollapsibleContent::wrapContent($contentId, 'content to make collapsible); 
     14 
     15// or you can use the helpers 
     16get_collapsible_content($contentId, 'content to make collapsible')) 
     17?> 
     18}}} 
     19 
    320This plugin is in ALPHA state and is provided as is, please use at your own risk and read the source if you have any questions. A stable release of this plugin will be release in August 2007. 
  • plugins/sfCollapsibleContentPlugin/lib/helper/CollapsibleContentHelper.php

    r3717 r4042  
    5353 
    5454/** 
     55 * get_collapsible_content  
     56 *  
     57 * <code> 
     58 * <?php 
     59 * echo get_collapsible_content('unique_id', 'content to be made collapsible'); 
     60 * ?> 
     61 * </code> 
     62 * 
     63 * @param mixed $id Unique id for content 
     64 * @param mixed $content Content to be made collapsible 
     65 * @param mixed $collapsed Default collapsed status (true/false) 
     66 * @param array $options Array/string of options for collapsible content 
     67 * @param mixed $label String label to be used for collapse wrapper, replaces the +/- icon. 
     68 * @access public 
     69 * @return void 
     70 */ 
     71function get_collapsible_content($id, $content, $collapsed = false, $options = array(), $label = null) 
     72{ 
     73  return get_collapsible_content_wrapper_controller($id, $collapsed, $label).wrap_collapsible_content($id, $content, $collapsed, $options); 
     74} 
     75 
     76/** 
    5577 * Set Collapsible Content Status  
    5678 *