本文整理汇总了PHP中Pages::getPageData方法的典型用法代码示例。如果您正苦于以下问题:PHP Pages::getPageData方法的具体用法?PHP Pages::getPageData怎么用?PHP Pages::getPageData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pages
的用法示例。
在下文中一共展示了Pages::getPageData方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: indexAction
public function indexAction()
{
// setup captcha
if (!$this->view->captcha) {
$this->view->setVar('captcha', new Captcha\Captcha($this->getDI()->get('config')->recaptcha));
}
// get page data
$pagesTable = new Pages();
$this->view->setVar(self::PAGE_NAME, $pagesTable->getPageData(self::PAGE_NAME));
// prepare form
if (!$this->view->form) {
$this->view->setVar('form', new \ContactForm\ContactForm());
}
if ($this->getDI()->getRequest()->isPost()) {
$this->view->form = new \ContactForm\ContactForm();
$newContact = new Contact();
if ($this->view->form->isValid($this->getDI()->getRequest()->getPost(), $newContact) && $this->view->getVar('captcha')->checkAnswer($this->getDI()->getRequest())) {
// create new feedback
$newContact->create();
// send notification to webmaster
$newContact->sendFeedbackToAdmin($this->getDI()->get('config'));
return $this->_forwardContactIndex();
} else {
// output error message
$this->view->setVar('errors', $this->view->form->getMessages());
}
}
}
示例2: indexAction
public function indexAction()
{
// enable specific js and css content for only this page
$this->view->setVar(self::PAGE_NAME, true);
// get page data from db
$pagesTable = new Pages();
$this->view->setVar(self::PAGE_NAME, $pagesTable->getPageData(self::PAGE_NAME));
}
示例3: indexAction
public function indexAction()
{
$pagesTable = new Pages();
$this->view->setVar(self::PAGE_NAME, $pagesTable->getPageData(self::PAGE_NAME));
}