コード例 #1
0
ファイル: SearchMapper.php プロジェクト: bono-cms/Shop
 /**
  * {@inheritDoc}
  */
 public function appendQuery(QueryBuilderInterface $queryBuilder, $placeholder)
 {
     $queryBuilder->select($this->getWithDefaults(array('description' => 'content')))->from(ProductMapper::getTableName())->whereEquals('lang_id', "'{$this->getLangId()}'")->andWhereEquals('published', '1')->andWhereLike('title', $placeholder)->orWhereLike('description', $placeholder);
 }
コード例 #2
0
ファイル: SearchMapper.php プロジェクト: bono-cms/Pages
 /**
  * {@inheritDoc}
  */
 public function appendQuery(QueryBuilderInterface $queryBuilder, $placeholder)
 {
     $queryBuilder->select($this->getWithDefaults(array('content')))->from(PageMapper::getTableName())->whereEquals('seo', '1')->andWhereEquals('lang_id', "'{$this->getLangId()}'")->rawAnd()->openBracket()->like('title', $placeholder)->rawOr()->like('content', $placeholder)->closeBracket();
 }