/** * 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))); } }
/** * 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; } }