当前位置: 首页>>代码示例>>PHP>>正文


PHP aTools::setCurrentPage方法代码示例

本文整理汇总了PHP中aTools::setCurrentPage方法的典型用法代码示例。如果您正苦于以下问题:PHP aTools::setCurrentPage方法的具体用法?PHP aTools::setCurrentPage怎么用?PHP aTools::setCurrentPage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在aTools的用法示例。


在下文中一共展示了aTools::setCurrentPage方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: executeRevert

 /**
  * DOCUMENT ME
  * @param sfWebRequest $request
  */
 public function executeRevert(sfWebRequest $request)
 {
     $version = false;
     $subaction = $request->getParameter('subaction');
     $this->preview = false;
     if ($subaction == 'preview') {
         $version = $request->getParameter('version');
         $this->preview = true;
     } elseif ($subaction == 'revert') {
         $version = $request->getParameter('version');
     }
     $id = $request->getParameter('id');
     $page = aPageTable::retrieveByIdWithSlotsForVersion($id, $version);
     $this->flunkUnless($page);
     $this->name = $this->getRequestParameter('name');
     $name = $this->name;
     $options = $this->getUser()->getAttribute("area-options-{$id}-{$name}", null, 'apostrophe');
     $this->flunkUnless(isset($options['edit']) && $options['edit']);
     if ($subaction == 'revert') {
         $page->newAreaVersion($this->name, 'revert');
         $page = aPageTable::retrieveByIdWithSlots($id);
     }
     aTools::setCurrentPage($page);
     $this->cancel = $subaction == 'cancel';
     $this->revert = $subaction == 'revert';
 }
开发者ID:hashir,项目名称:UoA,代码行数:30,代码来源:BaseaActions.class.php

示例2: setPageEnvironment

 public static function setPageEnvironment(sfAction $action, aPage $page)
 {
     // Title is pre-escaped as valid HTML
     $prefix = aTools::getOptionI18n('title_prefix');
     $action->getResponse()->setTitle($prefix . $page->getTitle(), false);
     // Necessary to allow the use of
     // aTools::getCurrentPage() in the layout.
     // In Symfony 1.1+, you can't see $action->page from
     // the layout.
     aTools::setCurrentPage($page);
     // Borrowed from sfSimpleCMS
     if (sfConfig::get('app_a_use_bundled_layout', true)) {
         $action->setLayout(sfContext::getInstance()->getConfiguration()->getTemplateDir('a', 'layout.php') . '/layout');
     }
     // Loading the a helper at this point guarantees not only
     // helper functions but also necessary JavaScript and CSS
     sfContext::getInstance()->getConfiguration()->loadHelpers('a');
 }
开发者ID:verenate,项目名称:gri,代码行数:18,代码来源:aTools.php

示例3: editAjax

 protected function editAjax($editorOpen)
 {
     // Refetch the page to reflect these changes before we
     // rerender the slot
     aTools::setCurrentPage(aPageTable::retrieveByIdWithSlots($this->page->id));
     // Symfony 1.2 can return partials rather than templates...
     // which gets us out of the "we need a template from some other
     // module" bind
     $variant = $this->slot->getEffectiveVariant($this->options);
     return $this->renderPartial("a/ajaxUpdateSlot", array("name" => $this->name, "type" => $this->type, "permid" => $this->permid, "options" => $this->options, "editorOpen" => $editorOpen, "pageid" => $this->page->id, "variant" => $variant, "validationData" => $this->validationData));
 }
开发者ID:quafzi,项目名称:timpany-prototype,代码行数:11,代码来源:BaseaSlotActions.class.php

示例4: editSave

 /**
  * DOCUMENT ME
  * @return mixed
  */
 protected function editSave()
 {
     $this->slot->save();
     $this->page->newAreaVersion($this->name, $this->newSlot ? 'add' : 'update', array('permid' => $this->permid, 'slot' => $this->slot, 'top' => sfConfig::get('app_a_new_slots_top', true)));
     // Refetch the page to reflect these changes before we
     // rerender the slot
     aTools::setCurrentPage(aPageTable::retrieveByIdWithSlots($this->page->id));
     if ($this->getRequestParameter('noajax')) {
         return $this->redirectToPage();
     } else {
         return $this->editAjax(false);
     }
 }
开发者ID:hashir,项目名称:UoA,代码行数:17,代码来源:BaseaSlotActions.class.php


注:本文中的aTools::setCurrentPage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。