Initializes the default configuration for the object.

Called from {@link __construct()} as a first step of object instantiation.

@param AnConfig $config An optional AnConfig object with configuration options.
338966
protected function _initialize(AnConfig $config)
    {
        $config->append(array(
            'asset_paths' => array(ANPATH_THEMES.'/'.AnService::get('application')->getTemplate().'/media'),
        ));

        parent::_initialize($config);
    }
999876
public function setConfig(AnConfig $config)
    {
        $identifier = $config->description->getRepository()->getIdentifier();

        $config->child = $config->through;

        parent::setConfig($config);

        $this->_target = AnService::getIdentifier($config->target);

        if (!$this->_target->application) {
            $this->_target->application = $identifier->application;
        }

        $this->_target_child_key = $config->target_child_key;

        $this->_target_parent_key = $config->target_parent_key;

        //set the junction alias (the connecting table alias)
        $this->_junction_alias = $config->as;
    }
884497
protected function _initialize(AnConfig $config)
    {
        $repoIdentifier = $config->mixer->getIdentifier()->identifier;
        $config->append(array(
            'relationships' => array(
                'mentions' => array(
                    'through' => 'com:people.domain.entity.mention',
                    'target' => str_replace('repository', 'entity', $repoIdentifier),
                    'child_key' => 'tagable',
                    'target_child_key' => 'mention',
                    'inverse' => true,
                ),
            ),
        ));

        parent::_initialize($config);
    }
706676
protected function _initialize(AnConfig $config)
    {
        $config->append(array(
            'repository' => $config->mixer->getIdentifier()->name,
            'priority' => AnCommand::PRIORITY_HIGHEST,
        ));

        parent::_initialize($config);
    }
1064747
protected function _initialize(ObjectConfig $config)
    {
        $config->append(array(
            'users' => array($this->getObject('user')),
        ));

        parent::_initialize($config);
    }
669245
protected function _initialize(AnConfig $config)
    {
        $name = explode('_', $this->_name);

        $config->append(array(
            'link_type' => 'strong',
            'alias' => AnInflector::singularize($name[count($name) - 1]).'_tbl',
        ));

        parent::_initialize($config);
    }
201926
protected function _initialize(AnConfig $config)
    {
        $config->append(array(
            'send_after_insert' => !get_config_value('notifications.use_cron', false),
        ));

        parent::_initialize($config);
    }
145530
protected function _initialize(AnConfig $config)
    {
        $settings = $this->getService('com:settings.setting');
        $database = $settings->db;
        $prefix = $settings->dbprefix;
        $port = null;
        $socket = null;
        $host = $settings->host;
        $username = $settings->user;
        $password = $settings->password;

        $targetSlot = substr(strstr($host, ":"), 1);

        if (!empty($targetSlot)) {
            // Get the port number or socket name
            if (is_numeric($targetSlot)) {
                $port = $targetSlot;
            } else {
                $socket = $targetSlot;
            }

            // Extract the host name only
            $host = substr($host, 0, strlen($host) - (strlen($targetSlot) + 1));

            // This will take care of the following notation: ":3306"
            if ($host === '') {
                $host = 'localhost';
            }
        }

        $config->append(array(
            'options' => array(
                'host' => $host,
                'username' => $username,
                'password' => $password,
                'database' => $database,
                'port' => $port,
                'socket' => $socket
            ),
            'table_prefix' => $settings->dbprefix,
            'charset' => 'utf8mb4'
        ));

        parent::_initialize($config);
    }
648411
protected function _initialize(AnConfig $config)
    {
        parent::_initialize($config);

        if ($config->request->view) {
            $config->controller = $config->request->view;
        }
    }
52762
protected function _initialize(AnConfig $config)
    {
        $config->append(array(
            'priority' => AnCommand::PRIORITY_NORMAL,
        ));

        parent::_initialize($config);
    }
783995
protected function _initialize(AnConfig $config)
    {
        $config->append(array(
            'title'         => AnInflector::humanize(AnInflector::pluralize($this->getName())),
            'controller'    => null,
        ));

        parent::_initialize($config);
    }
436861
protected function _initialize(AnConfig $config)
    {
        $config->append(array(
              'paths' => array(dirname(__FILE__).'/ui'),
        ));

        parent::_initialize($config);
    }
901424
protected function _initialize(AnConfig $config)
    {
        $config->append(array(
            'list_item_view' => AnInflector::singularize($this->getIdentifier()->package),
            'template_paths' => array(
                dirname(__FILE__).'/html',
                ANPATH_THEMES.'/'.$this->getService('application')->getTemplate().'/html/com_actors/actors'
            ),
        ));

        parent::_initialize($config);
    }
800008
protected function _initialize(AnConfig $config)
    {
        $config->append(array(
            'inheritance' => array(
                'abstract' => $this->getIdentifier()->classname === __CLASS__,
                'column' => 'type',
                'ignore' => array(),
            ),
            'resources' => array(
                array(
                    'name' => 'edges',
                    'alias' => $this->getIdentifier()->name,
                    ),
            ),
            'attributes' => array(
                'id' => array('key' => true),
            ),
            'behaviors' => array(
                'modifiable',
            ),
            'relationships' => array(
                'nodeA' => array(
                        'required' => true,
                        'polymorphic' => true,
                        'parent' => 'com:base.domain.entity.node',
                    ),
                'nodeB' => array(
                    'required' => true,
                    'polymorphic' => true,
                    'parent' => 'com:base.domain.entity.node',
                    ),
            ),
        ));

        return parent::_initialize($config);
    }
151312
public function setConfig(AnConfig $config)
    {
        parent::setConfig($config);

        $this->_type_column = $config->type_column;

        $this->_child_column = $config->child_column;

        $this->_polymorphic = $config->polymorphic === true;

        if (!isset($this->_parent)) {
            $this->_polymorphic = true;
        }
    }
675818
protected function _initialize(AnConfig $config)
    {
        $config->append(array(
            'toolbars' => array($this->getIdentifier()->name, 'menubar', 'actorbar'),
        ));

        parent::_initialize($config);
    }
1046724
protected function _initialize(AnConfig $config)
    {
        $config->append(array(
            'relationships' => array(
                'locations' => array(
                    'through' => 'com:locations.domain.entity.tag',
                    'target' => $config->target ? $config->target : 'com:base.domain.entity.node',
                    'child_key' => 'tagable',
                    'target_child_key' => 'location',
                    'inverse' => true,
                ),
            )
        ));

        parent::_initialize($config);
    }