| 1 | <?php |
||
| 20 | trait ElementListTrait |
||
| 21 | { |
||
| 22 | use ModifyElementQueryTrait, |
||
| 23 | NormalizeValueTrait, |
||
| 24 | InputTrait; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var bool |
||
| 28 | */ |
||
| 29 | protected $ignoreSearchKeywords = true; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @inheritdoc |
||
| 33 | */ |
||
| 34 | public function getSearchKeywords($value, ElementInterface $element): string |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Identify whether a sort order should be enforced. |
||
| 45 | * |
||
| 46 | * @return bool |
||
| 47 | */ |
||
| 48 | public function ensureSortOrder(): bool |
||
| 52 | |||
| 53 | /** |
||
| 54 | * Allow the settings to identify whether the element should be sortable |
||
| 55 | * |
||
| 56 | * @param bool $sortable |
||
| 57 | * @return $this |
||
| 58 | */ |
||
| 59 | public function setSortable(bool $sortable) |
||
| 64 | |||
| 65 | /** |
||
| 66 | * Get the sortable attribute value |
||
| 67 | * |
||
| 68 | * @return bool |
||
| 69 | */ |
||
| 70 | public function getSortable(): bool |
||
| 74 | } |
||
| 75 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: