/** * Decode event handler for actions that generate a postback event. * * @param Zikula_Form_View $view Reference to Zikula_Form_View object. * * @return boolean */ public function decodePostBackEvent(Zikula_Form_View $view) { $fullNameX = $this->id . '_' . $this->commandName . '_x'; $fullNameY = $this->id . '_' . $this->commandName . '_y'; if (isset($_POST[$fullNameX])) { $args = array('commandName' => $this->commandName, 'commandArgument' => $this->commandArgument, 'posX' => (int) $_POST[$fullNameX], 'posY' => (int) $_POST[$fullNameY]); if (!empty($this->onCommand)) { if ($view->raiseEvent($this->onCommand, $args) === false) { return false; } } } return true; }
/** * Called by Zikula_Form_View framework due to the use of getPostBackEventReference() above. * * @param Zikula_Form_View $view Reference to Zikula_Form_View object. * @param string $eventArgument The event argument. * * @return void */ function raisePostBackEvent(Zikula_Form_View $view, $eventArgument) { $args = array('commandName' => null, 'commandArgument' => null); if (!empty($this->onSelectedIndexChanged)) { $view->raiseEvent($this->onSelectedIndexChanged, $args); } }
/** * Called by Zikula_Form_View framework due to the use of Zikula_Form_View::getPostBackEventReference() above. * * @param Zikula_Form_View $view Reference to Zikula_Form_View object. * @param string $eventArgument The event argument. * * @return void */ public function raisePostBackEvent(Zikula_Form_View $view, $eventArgument) { $args = array('commandName' => $eventArgument, 'commandArgument' => null); if (!empty($this->onCommand)) { $view->raiseEvent($this->onCommand, $args); } }
/** * Called by Zikula_Form_View framework due to the use of getPostBackEventReference() above. * * @param Zikula_Form_View $view Reference to Zikula_Form_View object. * @param string $eventArgument The event argument. * * @return void */ public function raisePostBackEvent(Zikula_Form_View $view, $eventArgument) { $carg = unserialize($eventArgument); $args = array('commandName' => $carg['cname'], 'commandArgument' => $carg['carg']); if (!empty($this->onCommand)) { $view->raiseEvent($this->onCommand, $args); } }
/** * Called by Forms framework due to the use of getPostBackEventReference() above. * * @param Zikula_Form_View $view Reference to Form render object. * @param string $eventArgument The event argument. * * @return void */ public function raisePostBackEvent(Zikula_Form_View $view, $eventArgument) { $contextMenu = $this->getParentContextMenu(); $hiddenName = "contentMenuArgument" . $contextMenu->id; $commandArgument = $this->request->request->get($hiddenName, null); $args = array('commandName' => $eventArgument, 'commandArgument' => $commandArgument); $view->raiseEvent($contextMenu->onCommand == null ? 'handleCommand' : $contextMenu->onCommand, $args); }
/** * Decode event handler for actions that generate a postback event. * * @param Zikula_Form_View $view Reference to Form render object. * * @return boolean */ function decodePostBackEvent(Zikula_Form_View $view) { $fullName = $this->id . '_' . $this->commandName; if (isset($_POST[$fullName])) { $args = array('commandName' => $this->commandName, 'commandArgument' => $this->commandArgument); if (!empty($this->onCommand)) { if ($view->raiseEvent($this->onCommand, $args) === false) { return false; } } } return true; }