<?php
namespace Products\NotificationsBundle\Model\Searching;
use App\Model\Searching\AbstractSearch;
final class TemplateSearch extends AbstractSearch
{
public const FILTERS = [
self::FILTERS__ALL,
self::FILTERS__URGENT,
self::FILTERS__GENERAL,
self::FILTERS__AUTOMATION,
self::FILTERS__DRAFTS,
self::FILTERS__SENDABLE,
self::FILTERS__SENDABLE_URGENT,
self::FILTERS__SENDABLE_GENERAL,
];
public const FILTERS__DEFAULT = self::FILTERS__ALL;
public const FILTERS__ALL = 'all';
public const FILTERS__URGENT = 'urgent';
public const FILTERS__GENERAL = 'general';
public const FILTERS__AUTOMATION = 'automation';
public const FILTERS__DRAFTS = 'drafts';
public const FILTERS__SENDABLE = 'sendable';
public const FILTERS__SENDABLE_URGENT = 'sendable_urgent';
public const FILTERS__SENDABLE_GENERAL = 'sendable_general';
public const DIRECTIONS = [
self::SORTS__NAME => 'ASC',
self::SORTS__TYPE => 'ASC',
self::SORTS__TIMESTAMP => 'DESC',
];
public const SORTS__DEFAULT = self::SORTS__TIMESTAMP;
public const SORTS__NAME = 'name';
public const SORTS__TYPE = 'type';
public const SORTS__TIMESTAMP = 'timestamp';
/**
* @var string|null
*/
private ?string $lookup = null;
/**
* @var bool
*/
private bool $defaults = true;
/**
* @var string|null
*/
protected ?string $type = null;
/**
* @var bool|null
*/
protected ?bool $isForAutomation = null;
/**
* @return string|null
*/
public function getLookup(): ?string
{
return $this->lookup;
}
/**
* @param string|null $lookup
* @return $this
*/
public function setLookup(?string $lookup): self
{
$this->lookup = $lookup ?: null;
return $this;
}
/**
* @return bool
*/
public function hasDefaults(): bool
{
return $this->defaults;
}
/**
* @param bool $defaults
* @return $this
*/
public function setDefaults(bool $defaults): self
{
$this->defaults = $defaults;
return $this;
}
/**
* @return string|null
*/
public function getType(): ?string
{
return $this->type;
}
/**
* @param string|null $type
* @return $this
*/
public function setType(?string $type): self
{
$this->type = $type;
return $this;
}
/**
* @return bool|null
*/
public function isForAutomation(): ?bool
{
return $this->isForAutomation;
}
/**
* @param bool|null $isForAutomation
* @return $this
*/
public function setIsForAutomation(?bool $isForAutomation): self
{
$this->isForAutomation = $isForAutomation;
return $this;
}
}