コード例 #1
0
ファイル: imagefilter.php プロジェクト: netixx/frankiz
 public function __construct($cs)
 {
     if ($cs instanceof Collection) {
         $this->cids = $cs->ids();
     } else {
         $this->cids = Caste::toIds(unflatten($cs));
     }
 }
コード例 #2
0
ファイル: user.php プロジェクト: netixx/frankiz
 /**
  * Get the visibility flag associated with a caste.
  * This function only works for the session user.
  * @return Group associated with the visibility
  */
 public function casteVisibility(Caste $caste, Group $visibility = null)
 {
     if (!$this->isMe(S::user())) {
         return null;
     }
     if ($visibility !== null && self::rightsVisibilityIsPossible($caste->rights(), $visibility)) {
         XDB::execute('UPDATE  castes_users
                          SET  visibility = {?}
                        WHERE  uid = {?} AND cid = {?}', $visibility->id(), $this->id(), $caste->id());
         if ($this->cuvisibility == null) {
             $this->cuvisibility = array();
         }
         $this->cuvisibility[$caste->id()] = $visibility;
     }
     return empty($this->cuvisibility[$caste->id()]) ? null : $this->cuvisibility[$caste->id()];
 }
コード例 #3
0
ファイル: group.php プロジェクト: netixx/frankiz
 public function addCaste(Rights $rights)
 {
     if ($this->castes === null) {
         $this->castes = new Collection('Caste');
     }
     $caste = new Caste(array('group' => $this, 'rights' => $rights));
     $caste->insert();
     $this->castes->add($caste);
     return $caste;
 }
コード例 #4
0
ファイル: activityfilter.php プロジェクト: netixx/frankiz
 public function __construct($cs)
 {
     $this->cids = Caste::toIds(unflatten($cs));
 }
コード例 #5
0
 public function __construct($cs)
 {
     if ($cs instanceof Collection) {
         if ($cs->className() != 'Caste') {
             throw new Exception('AIFC_Target constructor takes a Collection<Caste>');
         }
         $this->cids = $cs->ids();
     } else {
         $this->cids = Caste::toIds(unflatten($cs));
     }
 }