Newer
Older
class EntryValues extends SelectQueryBuilder implements DoesSelectQueryByValue, DoesSelectQueryByEntryId
->equals($this->getEntryIdColumn(), $entryId)
public function queryByFieldValue($fieldSlug, $fieldValue, $type = 'equals', $whereOperator = 'AND', $columns = [])
if (! empty($columns)) {
->setColumns($columns);
->equals($this->getValueColumn(), $fieldValue)
;
break;
case 'notEquals':
$this->
getSelectQuery()
->notEquals($this->getValueColumn(), $fieldValue);
->like($this->getValueColumn(), $fieldValue);
break;
}
$this->isLike = 'like' === $type ? true : false;
if (!$this->isLike) {
$this->getSelectQuery()->where('AND')->equals('slug', $fieldSlug);
}
return $this;
}
/** @inheritdoc */
public function getValueColumn()
{
return 'value';
}
/** @inheritdoc */
public function getEntryIdColumn()
{
return 'entry_id';
}