Prado\Data\ActiveRecord\TActiveRecord::createRelationContext PHP Méthode

createRelationContext() protected méthode

Gets a static copy of the relationship context for given property (a key in $RELATIONS), returns null if invalid relationship. Keeps a null reference to all invalid relations called.
Since: 3.1.2
protected createRelationContext ( $name ) : TActiveRecordRelationContext
Résultat Prado\Data\ActiveRecord\Relations\TActiveRecordRelationContext object containing information on the active record relationships for given property, null if invalid relationship
    protected function createRelationContext($name)
    {
        if (($definition = $this->getRecordRelation($name)) !== null) {
            list($property, $relation) = $definition;
            return new TActiveRecordRelationContext($this, $property, $relation);
        } else {
            return null;
        }
    }