public function getRelationManager(EntityContract $entity)
    {
        $key = $entity->{$this->getRelationKey()};

        if (!isset($this->relations[$key])) {
            return null;
        }

        $class = $this->relations[$key];

        return new $class($this->getManager()->getAgent());
    }
public function getRelationManager(EntityContract $entity)
    {
        $key = $entity->{$this->getRelationKey()};

        if (!isset($this->relations[$key])) {
            return null;
        }

        $class = $this->relations[$key];

        return new $class($this->getManager()->getAgent());
    }
public function getRelationManager ( EntityContract $ entity ) { $ key = $ entity -> { $ this -> getRelationKey ( ) } ; if ( ! isset ( $ this -> relations [ $ key ] ) ) { return null ; } $ class = $ this -> relations [ $ key ] ; return new $ class ( $ this -> getManager ( ) -> getAgent ( ) ) ; }
Retrieve relation manager.

@param EntityContract $entity

@return \Railken\Lem\Contracts\ManagerContract
Retrieve relation manager .