sectionExists ($input ['section'])) $this->section = $business->getSection ($input ['section']); else $this->section = $business->getSection (Section::TCURRENT); if (isset ($input ['action']) && $this->section->actionExists ($input ['action'])) $this->action = $this->section->getAction ($input ['action']); else $this->action = $this->section->getAction (Action::TCURRENT); if (isset ($input ['itemId'])) $itemId = $input ['itemId']; else { global $itemId; if (!is_null ($itemId)) $this->itemId = $itemId; } if (isset ($input ['label']) && trim ($input ['label']) != '') $this->label = translate ($input ['label']); else $this->label = $this->action->getLabel (); if (isset ($input ['image']) && trim ($input ['image']) != '') $this->image = $input ['image']; else $this->image = $this->action->getName () .'.png'; } public function getMenuItem () { $user = User::singleton (); if ($user->accessSection ($this->section->getName ()) && $user->accessAction ($this->action->getName (), $this->section->getName ())) return '
  • '. $this->label .''. $this->label .'
  • '; return '
  • '. $this->label .''. $this->label .'
  • '; } public function getSubmenuItem () { $user = User::singleton (); if ($user->accessSection ($this->section->getName ()) && $user->accessAction ($this->action->getName (), $this->section->getName ())) return '
  • '. $this->label .'
  • '; return '
  • '. $this->label .'
  • '; } public function getDoc () { return $this->section->getDoc ($this->action->getName ()); } } ?>