src/Model/Behavior/SlugBehavior.php
public function findSlugged(Query $query, array $options)
    {
        if (!isset($options['slug'])) {
            throw new InvalidArgumentException('The `slug` key is required by the `slugged` finder.');
        }

        return $query->where([
            $this->_table->aliasField($this->getConfig('field')) => $options['slug'],
        ]);
    }
public function findSlugged(Query $query, array $options)
    {
        if (!isset($options['slug'])) {
            throw new InvalidArgumentException('The `slug` key is required by the `slugged` finder.');
        }

        return $query->where([
            $this->_table->aliasField($this->getConfig('field')) => $options['slug'],
        ]);
    }
public function findSlugged ( Query $ query , array $ options ) { if ( ! isset ( $ options [ 'slug' ] ) ) { throw new InvalidArgumentException ( 'The `slug` key is required by the `slugged` finder.' ) ; } return $ query -> where ( [ $ this -> _table -> aliasField ( $ this -> getConfig ( 'field' ) ) => $ options [ 'slug' ] , ] ) ; }
Custom finder.

@param \Cake\ORM\Query $query Query.
@param array $options Options.
@return \Cake\ORM\Query Query.
Custom finder .