Example #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'));
 }
Example #2
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('behaviors' => array('validatable', 'com://site/mailer.controller.behavior.mailer')));
     parent::_initialize($config);
     AnHelperArray::unsetValues($config->behaviors, 'ownable');
     //if it's a person view , set the default id to person
     if ($config->request->view == 'person') {
         $config->append(array('request' => array('id' => get_viewer()->id)));
     }
 }
Example #3
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.
  */
 protected function _initialize(KConfig $config)
 {
     $config->append(array('behaviors' => array('validatable', 'com://site/mailer.controller.behavior.mailer'), 'request' => array('reset_password' => 0)));
     parent::_initialize($config);
     AnHelperArray::unsetValues($config->behaviors, 'ownable');
     $this->_allowed_user_types = array(ComPeopleDomainEntityPerson::USERTYPE_ADMINISTRATOR, ComPeopleDomainEntityPerson::USERTYPE_REGISTERED);
     $viewer = get_viewer();
     if ($viewer->superadmin()) {
         $this->_allowed_user_types[] = ComPeopleDomainEntityPerson::USERTYPE_SUPER_ADMINISTRATOR;
     }
 }
Example #4
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('behaviors' => array('parentable' => array('parent' => 'page')), 'attributes' => array('excerpt' => 'excerpt', 'revisionNum' => 'ordering'), 'aliases' => array('title' => 'name')));
     parent::_initialize($config);
     AnHelperArray::unsetValues($config->behaviors, array('commentable', 'subscribable', 'hashtagable'));
 }
Example #5
0
 /**
  * Initializes the options for the object.
  *
  * Called from {@link __construct()} as a first step of object instantiation.
  *
  * @param 	object 	An optional KConfig object with configuration options.
  */
 protected function _initialize(KConfig $config)
 {
     $config->append(array('behaviors' => array('parentable', 'votable', 'com://site/hashtags.controller.behavior.hashtagable', 'com://site/people.controller.behavior.mentionable')));
     AnHelperArray::unsetValues($config->behaviors, 'verifiable');
     parent::_initialize($config);
 }