コード例 #1
0
ファイル: Site.php プロジェクト: akinyeleolubodun/PhireCMS2
 /**
  * Get site by ID method
  *
  * @param  int $id
  * @return void
  */
 public function getById($id)
 {
     $site = Table\Sites::findById($id);
     if (isset($site->id)) {
         $siteValues = $site->getValues();
         $siteValues = array_merge($siteValues, FieldValue::getAll($id));
         $this->data = array_merge($this->data, $siteValues);
     }
 }
コード例 #2
0
ファイル: User.php プロジェクト: akinyeleolubodun/PhireCMS2
 /**
  * Get user by ID method
  *
  * @param  int     $id
  * @return void
  */
 public function getById($id)
 {
     $user = Table\Users::findById($id);
     if (isset($user->id)) {
         $type = Table\UserTypes::findById($user->type_id);
         $userValues = $user->getValues();
         $userValues['type_name'] = isset($type->id) ? ucwords(str_replace('-', ' ', $type->type)) : null;
         $userValues['email1'] = $userValues['email'];
         $userValues['verified'] = (int) $userValues['verified'];
         $userValues = array_merge($userValues, FieldValue::getAll($id));
         $this->data = array_merge($this->data, $userValues);
     }
 }
コード例 #3
0
 /**
  * Get role by ID method
  *
  * @param  int     $id
  * @return void
  */
 public function getById($id)
 {
     $role = Table\UserRoles::findById($id);
     if (isset($role->id)) {
         $roleValues = $role->getValues();
         $roleValues = array_merge($roleValues, FieldValue::getAll($id));
         $this->data = array_merge($this->data, $roleValues);
     }
 }