original_string: protected function prepareSearch(Request $request)
      {
          $value = $request->getSearch()->getValue();
  
          if (!empty($value)) {
              $where = [];
              foreach ($request->getColumns() as $column) {
                  if ($column->getSearchable() === true) {
                      $where[$column->getData() . ' LIKE'] = '%' . $value . '%';
                  }
              }
  
              $this->query->andWhere(
                  function (QueryExpression $exp) use ($where) {
                      return $exp->or_($where);
                  }
              );
          }
      }
code: protected function prepareSearch(Request $request)
      {
          $value = $request->getSearch()->getValue();
  
          if (!empty($value)) {
              $where = [];
              foreach ($request->getColumns() as $column) {
                  if ($column->getSearchable() === true) {
                      $where[$column->getData() . ' LIKE'] = '%' . $value . '%';
                  }
              }
  
              $this->query->andWhere(
                  function (QueryExpression $exp) use ($where) {
                      return $exp->or_($where);
                  }
              );
          }
      }
code_tokens: protected function prepareSearch ( Request $ request ) { $ value = $ request -> getSearch ( ) -> getValue ( ) ; if ( ! empty ( $ value ) ) { $ where = [ ] ; foreach ( $ request -> getColumns ( ) as $ column ) { if ( $ column -> getSearchable ( ) === true ) { $ where [ $ column -> getData ( ) . ' LIKE' ] = '%' . $ value . '%' ; } } $ this -> query -> andWhere ( function ( QueryExpression $ exp ) use ( $ where ) { return $ exp -> or_ ( $ where ) ; } ) ; } }
docstring: Prepare CakePHP search
  
  @param Request $request DataTable request
docstring_tokens: Prepare CakePHP search