Ejemplo n.º 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.
  */
 protected function _initialize(KConfig $config)
 {
     $config->append(array('inheritance' => array('abstract' => $this->getIdentifier()->classname === __CLASS__), 'relationships' => array('author' => array('parent' => 'com:people.domain.entity.person', 'child_column' => 'created_by', 'required' => true)), 'attributes' => array('name' => array('read' => 'public'), 'enabled' => array('default' => 1)), 'behaviors' => array('votable', 'authorizer', 'privatable', 'ownable', 'dictionariable', 'subscribable', 'describable', 'com://site/hashtags.domain.behavior.hashtagable', 'com://site/people.domain.behavior.mentionable')));
     $behaviors = $config->behaviors;
     $behaviors->append(array('modifiable' => array('modifiable_properties' => array('name', 'body')), 'commentable' => array('comment' => array('length' => 5000))));
     parent::_initialize($config);
 }
Ejemplo n.º 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.
  */
 protected function _initialize(KConfig $config)
 {
     $config->append(array('inheritance' => array('ignore' => __CLASS__), 'behaviors' => array('privatable', 'com://site/locations.domain.behavior.geolocatable')));
     parent::_initialize($config);
 }
Ejemplo n.º 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('inheritance' => array('abstract' => $this->getIdentifier()->classname == __CLASS__), 'attributes' => to_hash(array('name' => array('required' => AnDomain::VALUE_NOT_EMPTY, 'format' => 'string', 'read' => 'public'), 'body' => array('format' => 'string'), 'status', 'statusUpdateTime')), 'behaviors' => to_hash(array('subscribable', 'modifiable', 'storable', 'describable', 'authorizer', 'privatable', 'administrable', 'enableable', 'verifiable', 'dictionariable', 'followable', 'com://site/hashtags.domain.behavior.hashtagable', 'com://site/locations.domain.behavior.geolocatable', 'coverable', 'portraitable' => array('sizes' => array('small' => '80xauto', 'medium' => '160xauto', 'large' => '480xauto', 'square' => 56))))));
     parent::_initialize($config);
 }
Ejemplo n.º 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.
  */
 protected function _initialize(KConfig $config)
 {
     $config->append(array('resources' => array('subscriptions_packages'), 'attributes' => array('name' => array('required' => true), 'body' => array('format' => 'html'), 'price' => array('type' => 'float', 'required' => true), 'duration' => array('type' => 'integer', 'required' => true), 'recurring' => array('type' => 'integer', 'default' => 0), 'billingPeriod' => array('column' => 'billing_period', 'required' => true)), 'relationships' => array('subscriptions' => array('parent_delete' => 'ignore')), 'behaviors' => array('authorizer', 'orderable', 'describable', 'enableable', 'dictionariable', 'modifiable')));
     parent::_initialize($config);
 }
Ejemplo n.º 5
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('name' => array('required' => AnDomain::VALUE_NOT_EMPTY, 'format' => 'string', 'read' => 'public', 'unique' => true)), 'behaviors' => to_hash(array('modifiable', 'describable')), 'relationships' => array('tagables' => array('through' => 'tag', 'child_key' => 'hashtag', 'target' => 'com:tags.domain.entity.node', 'target_child_key' => 'tagable'))));
     parent::_initialize($config);
 }
Ejemplo n.º 6
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('attributes' => array('actortype' => array('column' => 'name'), 'access'), 'relationships' => array('componentEntity' => array('type' => 'belongs_to', 'child_column' => 'component', 'parent_key' => 'component', 'parent' => 'com:components.domain.entity.assignment'), 'actor' => array('type' => 'belongs_to', 'child_column' => 'owner_id', 'type_column' => 'owner_type', 'polymorphic' => true))));
     parent::_initialize($config);
 }
Ejemplo n.º 7
0
 protected function _initialize(\KConfig $config)
 {
     $config->append(array('attributes' => array('name' => array('required' => AnDomain::VALUE_NOT_EMPTY), 'body' => array('required' => AnDomain::VALUE_NOT_EMPTY)), 'behaviors' => array('parentable' => array('parent' => 'thread', 'parent_delete' => 'ignore'), 'modifiable' => array('modifiable_properties' => array('name', 'body')), 'describable', 'votable', 'authorizer', 'enableable', 'com://site/hashtags.domain.behavior.hashtagable', 'com://site/people.domain.behavior.mentionable', 'privatable', 'com://site/forums.domain.behavior.newable')));
     parent::_initialize($config);
 }
Ejemplo n.º 8
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('name' => array('required' => true), 'type' => array('column' => 'body'), 'creationTime' => array('default' => 'date', 'column' => 'created_on'), 'status' => array('default' => self::STATUS_NOT_SENT), 'subscriberIds' => array('type' => 'set', 'default' => 'set', 'write' => 'private', 'required' => true)), 'behaviors' => array('serializable' => array('serializer' => 'com://site/stories.domain.serializer.story'), 'dictionariable'), 'relationships' => array('object' => array('polymorphic' => true, 'type_column' => 'story_object_type', 'child_column' => 'story_object_id'), 'subject' => array('required' => true, 'parent' => 'com:actors.domain.entity.actor', 'child_column' => 'story_subject_id'), 'target' => array('required' => true, 'parent' => 'com:actors.domain.entity.actor', 'child_column' => 'story_target_id'), 'comment' => array('parent' => 'com:base.domain.entity.comment', 'child_column' => 'story_comment_id'))));
     parent::_initialize($config);
 }
Ejemplo n.º 9
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('inheritance' => array('ignore' => __CLASS__), 'behaviors' => array('privatable')));
     parent::_initialize($config);
 }
Ejemplo n.º 10
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('name' => array('required' => true), 'body' => array('format' => 'string')), 'relationships' => array('subject' => array('required' => true, 'parent' => 'com:actors.domain.entity.actor', 'child_column' => 'story_subject_id'), 'target' => array('parent' => 'com:actors.domain.entity.actor', 'child_column' => 'story_target_id'), 'comment' => array('parent' => 'com:base.domain.entity.comment', 'child_column' => 'story_comment_id'), 'object' => array('polymorphic' => true, 'type_column' => 'story_object_type', 'child_column' => 'story_object_id', 'parent' => 'com:medium.domain.entity.medium')), 'behaviors' => array('aggregatable', 'authorizer', 'modifiable', 'ownable')));
     parent::_initialize($config);
 }
Ejemplo n.º 11
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('inheritance' => array('abstract' => $this->getIdentifier()->package == 'base'), 'attributes' => array('body' => array('required' => AnDomain::VALUE_NOT_EMPTY, 'format' => 'string')), 'behaviors' => array('parentable' => array('parent' => 'com:base.domain.entity.node'), 'com://site/hashtags.domain.behavior.hashtagable', 'com://site/people.domain.behavior.mentionable', 'modifiable', 'authorizer', 'locatable', 'votable')));
     parent::_initialize($config);
 }
Ejemplo n.º 12
0
 protected function _initialize(KConfig $config)
 {
     $config->append(array('attributes' => array('name' => array('required' => AnDomain::VALUE_NOT_EMPTY)), 'relationships' => array('forums'), 'behaviors' => array('authorizer', 'describable', 'orderable', 'parentable' => array('parent' => 'forum'), 'privatable')));
     parent::_initialize($config);
 }
Ejemplo n.º 13
0
 protected function _initialize(KConfig $config)
 {
     $config->append(array('attributes' => array('name' => array('required' => AnDomain::VALUE_NOT_EMPTY), 'body'), 'behaviors' => array('authorizer', 'describable', 'dictionariable', 'enableable', 'com://site/forums.domain.behavior.hittable', 'com://site/forums.domain.behavior.newable', 'lockable', 'modifiable', 'parentable' => array('parent' => 'forum'), 'privatable', 'pinnable', 'com://site/forums.domain.behavior.repliable', 'subscribable'), 'relationships' => array('posts')));
     parent::_initialize($config);
 }