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


PHP sfWebRequest::getAttribute方法代码示例

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


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

示例1: executeParameters

 public function executeParameters(sfWebRequest $request)
 {
     /*------------------------------ PREDEFINED LISTS---------------------------------------*/
     //List of tables to display:
     $this->tables = array_fill_keys(array(PredefinedLists::PUBLIC_CATEGORIES, PredefinedLists::UNITY, PredefinedLists::USER_AWARENESS, PredefinedLists::USER_SEG, PredefinedLists::COMPUTER_OS, PredefinedLists::COMPUTER_OS_FAMILY, PredefinedLists::METHOD_OF_PAYMENT), null);
     //Get all the tables to display:
     $this->tables = PredefinedLists::getData($this->tables);
     //Create a computer os form in order to have the select for the computer os family when adding a computer os:
     $this->os_form = new ComputerOsForm();
     /*---------------------------------- PARAMETERS------------------------------------------*/
     //Get the prefix of the current user:
     ParametersConfiguration::setUserPrefix(sfContext::getInstance()->getUser()->getAttribute('login'));
     //Get the parameters from xml file:
     $this->values = ParametersConfiguration::getAll();
     !$this->values['default_follow_moderator'] ? $this->values['default_follow_moderator'] = false : ($this->values['default_follow_moderator'] = true);
     //Indicate to the template if the system parameters have been updated (not by default):
     $this->update_system = $request->getAttribute('update_system', false);
     //Indicate to the template if the default parameters have been updated (not by default):
     $this->update_default = $request->getAttribute('update_def', false);
     /*------------------------------ SYSTEM PARAMETERS------------------------------------*/
     //Build the form:
     $this->form = new SystemParametersForm($this->values);
     /*----------------------------- DEFAULT PARAMETERS------------------------------------*/
     //Build the form:
     $cultures = array_merge($this->getContext()->get('InstalledCultures'), array('en'));
     $this->def_form = new DefaultParametersForm($this->values, array('cultures' => $cultures, 'follow' => $this->values['default_follow_moderator']));
 }
开发者ID:xmasclaux,项目名称:OpenGenepi,代码行数:27,代码来源:actions.class.php

示例2: executeAsk_confirmation

 /**
  * Requests are forwarded here when using the ->askConfirmation()
  * method on the actions class
  */
 public function executeAsk_confirmation(sfWebRequest $request)
 {
     if ($this->isAjax()) {
         $this->setLayout(false);
     } else {
         $this->loadAdminTheme();
     }
     $this->url = $request->getUri();
     $this->title = $request->getAttribute('title');
     $this->message = $request->getAttribute('message');
     $this->isAjax = $request->getAttribute('is_ajax');
 }
开发者ID:sympal,项目名称:sympal,代码行数:16,代码来源:Basesympal_defaultActions.class.php

示例3: executeMatchEmail

 public function executeMatchEmail(sfWebRequest $request)
 {
     $this->resource = $request->getAttribute('resource');
     $this->contact = $request->getAttribute('contact');
     $this->type = $this->resource['transaction_type'];
     $this->setLayout('layoutEmail');
 }
开发者ID:bshaffer,项目名称:Donate-Nashville,代码行数:7,代码来源:actions.class.php

示例4: executeConfirmation

 public function executeConfirmation(sfWebRequest $request)
 {
     $this->url = $request->getUri();
     $this->title = $request->getAttribute('title');
     $this->message = $request->getAttribute('message');
 }
开发者ID:bshaffer,项目名称:Symplist,代码行数:6,代码来源:actions.class.php

示例5: executeForm

 public function executeForm(sfWebRequest $request)
 {
     $this->reviewValue = $request->getParameter("v");
     $this->reviewType = $request->getParameter("t");
     $this->reviewEntityId = $request->getParameter("e");
     $this->reviewBox = $request->getParameter("b");
     $nl = $request->getParameter("nl");
     $this->reviewText = '';
     $this->reviewId = '';
     if ($request->getAttribute("cf") == 1) {
         $this->cf = 1;
     }
     $this->maxLength = BasesfReviewFrontActions::MAX_LENGTH;
     $this->redirect = false;
     if (!$this->getUser()->isAuthenticated()) {
         if ($nl == 1) {
             $this->prepareRedirect($request);
             $this->redirect = '@sf_guard_signin';
         } else {
             return 'NotLogged';
         }
     }
     if (!$this->redirect) {
         $criteria = new Criteria();
         $t = $request->getParameter("t");
         if ($t != '') {
             $criteria->add(SfReviewPeer::ENTITY_ID, $this->reviewEntityId);
             $criteria->add(SfReviewPeer::SF_REVIEW_TYPE_ID, $this->reviewType);
         } else {
             $criteria->add(SfReviewPeer::SF_REVIEW_ID, $this->reviewEntityId);
         }
         $criteria->add(SfReviewPeer::SF_GUARD_USER_ID, $this->getUser()->getGuardUser()->getId());
         if ($this->reviewValue) {
             SfReviewManager::postReview($this->getUser()->getGuardUser()->getId(), $this->reviewType, $this->reviewEntityId, $this->reviewValue, false, false, false, '?', 'form', '?');
         }
         $review = SfReviewPeer::doSelectOne($criteria);
         if ($review) {
             $this->reviewValue = $review->getValue();
             $this->reviewText = $review->getText();
             $this->reviewId = $review->getId();
             $this->reviewToFb = $review->getToFb();
             $this->reviewToTw = $review->getToTw();
             $this->anonReview = $review->getAnonymous();
         }
     }
 }
开发者ID:voota,项目名称:voota,代码行数:46,代码来源:BasesfReviewFrontActions.class.php

示例6: executeRegisterDone

 public function executeRegisterDone(sfWebRequest $request)
 {
     $this->user = $request->getAttribute('user');
     return sfView::SUCCESS;
 }
开发者ID:nacmartin,项目名称:nmDoctrineGuardStuffPlugin,代码行数:5,代码来源:actions.class.php

示例7: executeSendLoginTokenEmail

 /**
  * Builds the body for the send token email
  */
 public function executeSendLoginTokenEmail(sfWebRequest $request)
 {
     $this->user = $request->getAttribute('user');
     $this->setLayout('layoutEmail');
 }
开发者ID:bshaffer,项目名称:Donate-Nashville,代码行数:8,代码来源:actions.class.php

示例8: executeNeedEmail

 /**
  * Internal action used by create the body for the email that goes out
  * to the creator of a "need time"
  */
 public function executeNeedEmail(sfWebRequest $request)
 {
     $this->resource = $request->getAttribute('resource');
     $this->setLayout('layoutEmail');
 }
开发者ID:bshaffer,项目名称:Donate-Nashville,代码行数:9,代码来源:actions.class.php


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