本文整理汇总了PHP中Zikula_Form_View::raiseEvent方法的典型用法代码示例。如果您正苦于以下问题:PHP Zikula_Form_View::raiseEvent方法的具体用法?PHP Zikula_Form_View::raiseEvent怎么用?PHP Zikula_Form_View::raiseEvent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zikula_Form_View
的用法示例。
在下文中一共展示了Zikula_Form_View::raiseEvent方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: decodePostBackEvent
/**
* 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;
}
示例2: raisePostBackEvent
/**
* 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);
}
}
示例3: raisePostBackEvent
/**
* 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);
}
}
示例4: raisePostBackEvent
/**
* 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);
}
}
示例5: raisePostBackEvent
/**
* 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);
}
示例6: decodePostBackEvent
/**
* 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;
}