public function versions($reset = false)
    {
        if ($reset === false && $this->has('_versions')) {
            return $this->get('_versions');
        }

        /*
         * @var \Josegonzalez\Version\Model\Behavior\VersionBehavior $table
         * @var \Cake\Datasource\EntityInterface $this
         */
        $table = TableRegistry::get($this->getSource());
        $versions = $table->getVersions($this);
        $this->set('_versions', $versions);

        return $this->get('_versions');
    }
public function versions($reset = false)
    {
        if ($reset === false && $this->has('_versions')) {
            return $this->get('_versions');
        }

        /*
         * @var \Josegonzalez\Version\Model\Behavior\VersionBehavior $table
         * @var \Cake\Datasource\EntityInterface $this
         */
        $table = TableRegistry::get($this->getSource());
        $versions = $table->getVersions($this);
        $this->set('_versions', $versions);

        return $this->get('_versions');
    }
public function versions ( $ reset = false ) { if ( $ reset === false && $ this -> has ( '_versions' ) ) { return $ this -> get ( '_versions' ) ; } /*
         * @var \Josegonzalez\Version\Model\Behavior\VersionBehavior $table
         * @var \Cake\Datasource\EntityInterface $this
         */ $ table = TableRegistry :: get ( $ this -> getSource ( ) ) ; $ versions = $ table -> getVersions ( $ this ) ; $ this -> set ( '_versions' , $ versions ) ; return $ this -> get ( '_versions' ) ; }
Retrieves the related versions for the current entity

@param bool $reset If true, will re-retrieve the related version collection
@return \Cake\Collection\CollectionInterface
Retrieves the related versions for the current entity