public function destroy($conditions)
    {
        $result = false;
        if (!empty($conditions)) {
            $this->getCommandChain()->disable();
            $result = $this->getStore()->delete($this, $conditions);
            $this->getCommandChain()->enable();
        }

        return $result;
    }
public function destroy($conditions)
    {
        $result = false;
        if (!empty($conditions)) {
            $this->getCommandChain()->disable();
            $result = $this->getStore()->delete($this, $conditions);
            $this->getCommandChain()->enable();
        }

        return $result;
    }
public function destroy ( $ conditions ) { $ result = false ; if ( ! empty ( $ conditions ) ) { $ this -> getCommandChain ( ) -> disable ( ) ; $ result = $ this -> getStore ( ) -> delete ( $ this , $ conditions ) ; $ this -> getCommandChain ( ) -> enable ( ) ; } return $ result ; }
Destroy all the entities from a repository withouth instantiating them.

This method disables the chain in order to ensure the query is not modified by the
behaviors for unexpected results

If a boolean value true is passed as condition then all the records within the repository is
updated

@param array|AnDomainQuery|bool A condition object. Can be an array or domain query object

@return bool
Destroy all the entities from a repository withouth instantiating them .