本文整理汇总了PHP中Action::setCommonData方法的典型用法代码示例。如果您正苦于以下问题:PHP Action::setCommonData方法的具体用法?PHP Action::setCommonData怎么用?PHP Action::setCommonData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Action
的用法示例。
在下文中一共展示了Action::setCommonData方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setCommonData
/**
* Adds some common data to the view. this function must be manually called once
* we've set up a view.
*
* @param copyFormValues
* @see Action::setCommonData()
*/
function setCommonData($copyFormValues = false)
{
parent::setCommonData($copyFormValues);
// initialiaze plugins
$this->_pm->setBlogInfo($this->_blogInfo);
$this->_pm->setUserInfo($this->_userInfo);
$this->_pm->getPlugins();
$this->_view->setValue("user", $this->_userInfo);
$this->_view->setValue("userBlogs", $this->_userBlogs);
$this->_view->setUserInfo($this->_userInfo);
$this->_view->setValue("blog", $this->_blogInfo);
$this->_view->setValue("blogsettings", $this->_blogInfo->getSettings());
$this->_view->setValue("op", $this->_actionInfo->_actionParamValue);
$this->_view->setValue("locale", $this->_locale);
$this->_view->setValue("config", $this->_config);
}
示例2: setCommonData
/**
* Common things that should be performed by all SummaryAction classes
*/
function setCommonData($copyFormValues = false)
{
parent::setCommonData($copyFormValues);
$this->_view->setValue("locale", $this->_locale);
}
示例3: setCommonData
/**
* Sets some common information (dirty dirty...)
* @param copyFormValues Whether the values from fields that were registered via
* Action::registerFieldValidator() and Action::registerField() should be passed back to the view
* as variables or not. It defaults to 'false' but this parameter is useful in those cases
* when we would like to force an error to happen (not a validation error) and still keep the
* form values.
* @see Action::setCommonData()
*/
function setCommonData($copyFormValues = false)
{
$this->_view->setValue("Year", $this->_session->getValue('Year'));
$this->_view->setValue("Month", $this->_session->getValue('Month'));
parent::setCommonData($copyFormValues);
}