| 1 | <?php |
||
| 20 | abstract class Base |
||
| 21 | extends \Aimeos\Controller\Frontend\Base |
||
|
2 ignored issues
–
show
|
|||
| 22 | implements \Aimeos\Controller\Frontend\Common\Decorator\Iface, \Aimeos\Controller\Frontend\Attribute\Iface |
||
|
1 ignored issue
–
show
|
|||
| 23 | { |
||
| 24 | private $controller; |
||
| 25 | |||
| 26 | |||
| 27 | /** |
||
| 28 | * Initializes the controller decorator. |
||
| 29 | * |
||
| 30 | * @param \Aimeos\Controller\Frontend\Iface $controller Controller object |
||
| 31 | * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects |
||
| 32 | */ |
||
| 33 | public function __construct( \Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context ) |
||
| 46 | |||
| 47 | |||
| 48 | /** |
||
| 49 | * Passes unknown methods to wrapped objects. |
||
| 50 | * |
||
| 51 | * @param string $name Name of the method |
||
| 52 | * @param array $param List of method parameter |
||
| 53 | * @return mixed Returns the value of the called method |
||
| 54 | * @throws \Aimeos\Controller\Frontend\Exception If method call failed |
||
| 55 | */ |
||
| 56 | public function __call( $name, array $param ) |
||
| 60 | |||
| 61 | |||
| 62 | /** |
||
| 63 | * Returns the given search filter with the conditions attached for filtering by type code |
||
| 64 | * |
||
| 65 | * @param \Aimeos\MW\Criteria\Iface $filter Criteria object used for attribute search |
||
| 66 | * @param array $codes List of attribute type codes |
||
| 67 | * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching |
||
| 68 | * @since 2017.03 |
||
| 69 | */ |
||
| 70 | public function addFilterTypes( \Aimeos\MW\Criteria\Iface $filter, array $codes ) |
||
| 74 | |||
| 75 | |||
| 76 | /** |
||
| 77 | * Returns the default attribute filter |
||
| 78 | * |
||
| 79 | * @param boolean True to add default criteria |
||
| 80 | * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching |
||
| 81 | * @since 2017.03 |
||
| 82 | */ |
||
| 83 | public function createFilter() |
||
| 87 | |||
| 88 | |||
| 89 | /** |
||
| 90 | * Returns the attribute item for the given attribute ID |
||
| 91 | * |
||
| 92 | * @param string $id Unique attribute ID |
||
| 93 | * @param string[] $domains Domain names of items that are associated with the attributes and that should be fetched too |
||
| 94 | * @return \Aimeos\MShop\Attribute\Item\Iface Attribute item including the referenced domains items |
||
| 95 | * @since 2017.03 |
||
| 96 | */ |
||
| 97 | public function getItem( $id, array $domains = array( 'media', 'price', 'text' ) ) |
||
| 101 | |||
| 102 | |||
| 103 | /** |
||
| 104 | * Returns the attribute items for the given attribute IDs |
||
| 105 | * |
||
| 106 | * @param string $ids Unique attribute IDs |
||
| 107 | * @param string[] $domains Domain names of items that are associated with the attributes and that should be fetched too |
||
| 108 | * @return \Aimeos\MShop\Attribute\Item\Iface[] Associative list of attribute item including the referenced domains items |
||
| 109 | * @since 2017.03 |
||
| 110 | */ |
||
| 111 | public function getItems( array $ids, array $domains = array( 'media', 'price', 'text' ) ) |
||
| 115 | |||
| 116 | |||
| 117 | /** |
||
| 118 | * Returns the attributes filtered by the given criteria object |
||
| 119 | * |
||
| 120 | * @param \Aimeos\MW\Criteria\Iface $filter Critera object which contains the filter conditions |
||
| 121 | * @param string[] $domains Domain names of items that are associated with the attributes and that should be fetched too |
||
| 122 | * @param integer &$total Parameter where the total number of found attributes will be stored in |
||
| 123 | * @return array Ordered list of attribute items implementing \Aimeos\MShop\Attribute\Item\Iface |
||
| 124 | * @since 2017.03 |
||
| 125 | */ |
||
| 126 | public function searchItems( \Aimeos\MW\Criteria\Iface $filter, array $domains = array( 'media', 'price', 'text' ), &$total = null ) |
||
| 130 | |||
| 131 | |||
| 132 | /** |
||
| 133 | * Returns the frontend controller |
||
| 134 | * |
||
| 135 | * @return \Aimeos\Controller\Frontend\Attribute\Iface Frontend controller object |
||
| 136 | */ |
||
| 137 | protected function getController() |
||
| 141 | } |
||
| 142 |