Example #1
0
 function Item($name, $item, $title = '')
 {
     // Some items should have a specific class
     if ($showIfArray = $this->module->schema[$name]['showIf']) {
         $field = $showIfArray[0];
         $value = $showIfArray[1];
         // Check whether it is a valid field
         if ($this->module->schema[$field]) {
             $class = 'hidden ' . $field . $value;
         }
     }
     // Include note if provided and only if we're already displaying a title
     if ($title && $this->module->strings['notes'][$name]) {
         $note = e('div', array('class' => 'note'), $this->module->strings['notes'][$name]);
     }
     return parent::Item($name, $item, $title, $class, $note);
 }