1 | <?php |
||
20 | class Standard |
||
21 | extends \Aimeos\Controller\Frontend\Base |
||
22 | implements Iface, \Aimeos\Controller\Frontend\Common\Iface |
||
23 | { |
||
24 | private $conditions = []; |
||
25 | private $filter; |
||
26 | private $manager; |
||
27 | |||
28 | |||
29 | /** |
||
30 | * Common initialization for controller classes |
||
31 | * |
||
32 | * @param \Aimeos\MShop\Context\Item\Iface $context Common MShop context object |
||
33 | */ |
||
34 | public function __construct( \Aimeos\MShop\Context\Item\Iface $context ) |
||
44 | |||
45 | |||
46 | /** |
||
47 | * Clones objects in controller and resets values |
||
48 | */ |
||
49 | public function __clone() |
||
53 | |||
54 | |||
55 | /** |
||
56 | * Adds generic condition for filtering |
||
57 | * |
||
58 | * @param string $operator Comparison operator, e.g. "==", "!=", "<", "<=", ">=", ">", "=~", "~=" |
||
59 | * @param string $key Search key defined by the locale manager, e.g. "locale.status" |
||
60 | * @param array|string $value Value or list of values to compare to |
||
61 | * @return \Aimeos\Controller\Frontend\Locale\Iface Locale controller for fluent interface |
||
62 | * @since 2019.04 |
||
63 | */ |
||
64 | public function compare( $operator, $key, $value ) |
||
69 | |||
70 | |||
71 | /** |
||
72 | * Returns the locale for the given locale ID |
||
73 | * |
||
74 | * @param string $id Unique locale ID |
||
75 | * @return \Aimeos\MShop\Locale\Item\Iface Locale item including the referenced domains items |
||
76 | * @since 2019.04 |
||
77 | */ |
||
78 | public function get( $id ) |
||
82 | |||
83 | |||
84 | /** |
||
85 | * Parses the given array and adds the conditions to the list of conditions |
||
86 | * |
||
87 | * @param array $conditions List of conditions, e.g. ['>' => ['locale.interval' => 'P0Y1M0W0D']] |
||
88 | * @return \Aimeos\Controller\Frontend\Locale\Iface Locale controller for fluent interface |
||
89 | * @since 2019.04 |
||
90 | */ |
||
91 | public function parse( array $conditions ) |
||
96 | |||
97 | |||
98 | /** |
||
99 | * Returns the locales filtered by the previously assigned conditions |
||
100 | * |
||
101 | * @param integer &$total Parameter where the total number of found locales will be stored in |
||
102 | * @return \Aimeos\MShop\Locale\Item\Iface[] Ordered list of locale items |
||
103 | * @since 2019.04 |
||
104 | */ |
||
105 | public function search( &$total = null ) |
||
110 | |||
111 | |||
112 | /** |
||
113 | * Sets the start value and the number of returned locale items for slicing the list of found locale items |
||
114 | * |
||
115 | * @param integer $start Start value of the first locale item in the list |
||
116 | * @param integer $limit Number of returned locale items |
||
117 | * @return \Aimeos\Controller\Frontend\Locale\Iface Locale controller for fluent interface |
||
118 | * @since 2019.04 |
||
119 | */ |
||
120 | public function slice( $start, $limit ) |
||
125 | |||
126 | |||
127 | /** |
||
128 | * Sets the sorting of the result list |
||
129 | * |
||
130 | * @param string|null $key Sorting key of the result list like "position", null for no sorting |
||
131 | * @return \Aimeos\Controller\Frontend\Locale\Iface Locale controller for fluent interface |
||
132 | * @since 2019.04 |
||
133 | */ |
||
134 | public function sort( $key = null ) |
||
158 | } |
||
159 |