Example #1
0
 /**
  * Per Saveable interface, get an array of this table's data
  *
  * We override this so that we can add our roles array to it. 
  *
  */
 public function getArray()
 {
     $a = parent::getArray();
     if ($this->useRoles) {
         $a['roles'] = array();
         foreach ($this->getRoles() as $role) {
             $a['roles'][] = $role->id;
         }
     } else {
         unset($a['roles'], $a['editRoles'], $a['addRoles'], $a['createRoles']);
     }
     return $a;
 }
Example #2
0
 /**
  * Get an array of all variables accessible (locally scoped) to the PHP template file
  * 
  * @return array
  *
  */
 public function getArray()
 {
     return array_merge($this->fuel->getArray(), parent::getArray());
 }