コード例 #1
0
 /**
  * {@inheritDoc}
  */
 public function getAnonymous()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getAnonymous', array());
     return parent::getAnonymous();
 }
コード例 #2
0
ファイル: Profile.php プロジェクト: kirkbauer2/kirkxc
 /**
  * Preprocess access level
  *
  * @param integer              $accessLevel Access level
  * @param array                $column      Column data
  * @param \XLite\Model\Profile $entity      Profile
  *
  * @return string
  */
 protected function preprocessAccessLevel($accessLevel, array $column, \XLite\Model\Profile $entity)
 {
     if (0 == $accessLevel) {
         $result = $entity->getAnonymous() ? static::t('Anonymous') : static::t('Customer');
         if ($entity->getMembership() || $entity->getPendingMembership()) {
             $result .= ' (';
         }
         if ($entity->getMembership()) {
             $result .= $entity->getMembership()->getName();
         }
         if ($entity->getPendingMembership()) {
             if ($entity->getMembership()) {
                 $result .= ', ';
             }
             $result .= static::t('requested for') . ' ' . $entity->getPendingMembership()->getName();
         }
         if ($entity->getMembership() || $entity->getPendingMembership()) {
             $result .= ')';
         }
     } else {
         $result = static::t('Administrator');
     }
     return $result;
 }