Mage_Adminhtml_Block_Widget_Accordion_Item Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Widget_Accordion_Item:

Mage_Adminhtml_Block_Widget Mage_Adminhtml_Block_Template Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 __construct ()
 setAccordion ($accordion)
 getTarget ()
 getTitle ()
 getContent ()
 getClass ()

Protected Member Functions

 _toHtml ()

Protected Attributes

 $_accordion


Detailed Description

Definition at line 34 of file Item.php.


Constructor & Destructor Documentation

__construct (  ) 

Constructor

By default is looking for first argument as array and assignes it as object attributes This behaviour may change in child classes

Reimplemented from Varien_Object.

Definition at line 38 of file Item.php.

00039     {
00040         parent::__construct();
00041     }


Member Function Documentation

_toHtml (  )  [protected]

Render block HTML

Returns:
string

Reimplemented from Mage_Core_Block_Template.

Definition at line 84 of file Item.php.

00085     {
00086         $content = $this->getContent();
00087         $html = '<dt id="dt-'.$this->getHtmlId().'" class="'.$this->getClass().'">';
00088         $html.= $this->getTitle();
00089         $html.= '</dt>';
00090         $html.= '<dd id="dd-'.$this->getHtmlId().'" class="'.$this->getClass().'">';
00091         $html.= $content;
00092         $html.= '</dd>';
00093         return $html;
00094     }

getClass (  ) 

Definition at line 75 of file Item.php.

00076     {
00077         $class = $this->getData('class');
00078         if ($this->getOpen()) {
00079             $class.= ' open';
00080         }
00081         return $class;
00082     }

getContent (  ) 

Definition at line 63 of file Item.php.

00064     {
00065         $content = $this->getData('content');
00066         if (is_string($content)) {
00067             return $content;
00068         }
00069         if ($content instanceof Mage_Core_Block_Abstract) {
00070             return $content->toHtml();
00071         }
00072         return null;
00073     }

getTarget (  ) 

Definition at line 49 of file Item.php.

00050     {
00051         return ($this->getAjax()) ? 'ajax' : '';
00052     }

getTitle (  ) 

Definition at line 54 of file Item.php.

00055     {
00056         $title  = $this->getData('title');
00057         $url    = $this->getContentUrl() ? $this->getContentUrl() : '#';
00058         $title  = '<a href="'.$url.'" class="'.$this->getTarget().'">'.$title.'</a>';
00059 
00060         return $title;
00061     }

setAccordion ( accordion  ) 

Definition at line 43 of file Item.php.

00044     {
00045         $this->_accordion = $accordion;
00046         return $this;
00047     }


Member Data Documentation

$_accordion [protected]

Definition at line 36 of file Item.php.


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:23:06 2009 for Magento by  doxygen 1.5.8