original_string: protected function _slugExists($slug, ServerRequest $request)
      {
          $existingSlug = $this->find('all')
              ->select($this->getAlias() . '.slug')
              ->where([
                  $this->getAlias() . '.slug' => $slug,
                  $this->getAlias() . '.controller' => $request->getParam('controller'),
                  $this->getAlias() . '.action' => $request->getParam('action')
              ])
              ->where($this->_pluginCondition($request))
              ->enableHydration(false)
              ->first();
  
          return $existingSlug !== null;
      }
code: protected function _slugExists($slug, ServerRequest $request)
      {
          $existingSlug = $this->find('all')
              ->select($this->getAlias() . '.slug')
              ->where([
                  $this->getAlias() . '.slug' => $slug,
                  $this->getAlias() . '.controller' => $request->getParam('controller'),
                  $this->getAlias() . '.action' => $request->getParam('action')
              ])
              ->where($this->_pluginCondition($request))
              ->enableHydration(false)
              ->first();
  
          return $existingSlug !== null;
      }
code_tokens: protected function _slugExists ( $ slug , ServerRequest $ request ) { $ existingSlug = $ this -> find ( 'all' ) -> select ( $ this -> getAlias ( ) . '.slug' ) -> where ( [ $ this -> getAlias ( ) . '.slug' => $ slug , $ this -> getAlias ( ) . '.controller' => $ request -> getParam ( 'controller' ) , $ this -> getAlias ( ) . '.action' => $ request -> getParam ( 'action' ) ] ) -> where ( $ this -> _pluginCondition ( $ request ) ) -> enableHydration ( false ) -> first ( ) ; return $ existingSlug !== null ; }
docstring: Check if a slug for the given request params already exists.
  
  @param string $slug
  @param ServerRequest $request
  @return bool
docstring_tokens: Check if a slug for the given request params already exists .