public static function initialize(Config $config) { ItemTrait::initialize($config); InheritedTrait::initialize($config); TimestampsTrait::initialize($config); $config->addRels([new Rel\BelongsTo('purchase', $config, Purchase::getRepo()), new Rel\BelongsTo('storePurchase', $config, StorePurchase::getRepo())]); }
public static function initialize($config) { MaterializedPathTrait::initialize($config); InheritedTrait::initialize($config); }
public static function initialize(Config $config) { InheritedTrait::initialize($config); MaterializedPathTrait::initialize($config); $config->addAsserts([new Assert\Present('name')]); }
public static function initialize($config) { InheritedTrait::initialize($config); $config->belongsTo('user', __NAMESPACE__ . '\\User')->hasMany('postTags', __NAMESPACE__ . '\\PostTag')->hasManyThrough('tags', __NAMESPACE__ . '\\Tag', 'postTags')->assertPresent('title'); }