Пример #1
0
 /**
  * Initializes the default configuration for the object
  *
  * Called from {@link __construct()} as a first step of object instantiation.
  *
  * @param KConfig $config An optional KConfig object with configuration options.
  *
  * @return void
  */
 protected function _initialize(KConfig $config)
 {
     $config->append(array('attributes' => array('administratingIds' => array('type' => 'set', 'default' => 'set'), 'userId' => array('column' => 'person_userid', 'key' => true, 'type' => 'integer'), 'username' => array('column' => 'person_username', 'key' => true, 'format' => 'username'), 'userType' => array('column' => 'person_usertype', 'write' => 'protected'), 'email' => array('column' => 'person_useremail', 'key' => true, 'format' => 'email'), 'givenName' => array('column' => 'person_given_name', 'format' => 'string'), 'familyName' => array('column' => 'person_family_name', 'format' => 'string'), 'lastVisitDate' => array('type' => 'date', 'column' => 'person_lastvisitdate'), 'language' => array('column' => 'person_language'), 'timezone' => array('column' => 'person_time_zone'), 'gender' => array('column' => 'actor_gender')), 'aliases' => array('registrationDate' => 'creationTime', 'aboutMe' => 'description'), 'behaviors' => to_hash(array('describable' => array('searchable_properties' => array('username')), 'administrator', 'notifiable', 'leadable'))));
     $config->behaviors->append(array('followable' => array('subscribe_after_follow' => false)));
     parent::_initialize($config);
     AnHelperArray::unsetValues($config->behaviors, array('administrable'));
 }