本文整理匯總了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;
}