public function setup()
 {
     if (!$this->getOption('member') instanceof Member) {
         throw new LogicException('opMemberPointForm needs member object by option');
     }
     $this->setWidget('point', new sfWidgetFormInput());
     $this->setValidator('point', new sfValidatorInteger());
     $this->setDefault('point', opPointUtil::getPoint($this->getOption('member')->getId()));
     $this->widgetSchema->setNameFormat('member[%s]');
 }
 /**
  * executes point box
  *
  * @param sfWebRequest $request
  */
 public function executePointBox(sfWebRequest $request)
 {
     $this->point = opPointUtil::getPoint($request->getParameter('id', null));
 }
示例#3
0
 public function executeMemberPoint(sfWebRequest $request)
 {
     $this->pager = opPointUtil::getMemberListPagerOrderByPoint($request->getParameter('page', 1));
 }
 /**
  * point up action
  * 
  * @param string $name
  */
 protected function pointUp($name, $memberId = null)
 {
     $point = (int) Doctrine::getTable('SnsConfig')->get('op_point_' . $name, 0);
     $reason = isset(self::$pointConfig[$name]['caption']) ? self::$pointConfig[$name]['caption'] : $name;
     opPointUtil::addPoint($point, $memberId, $reason);
 }