@@ -29,15 +29,15 @@ discard block |
||
29 | 29 | * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching |
30 | 30 | * @since 2017.03 |
31 | 31 | */ |
32 | - public function addFilterTypes( \Aimeos\MW\Criteria\Iface $filter, array $codes ) |
|
32 | + public function addFilterTypes(\Aimeos\MW\Criteria\Iface $filter, array $codes) |
|
33 | 33 | { |
34 | - if( !empty( $codes ) ) |
|
34 | + if (!empty($codes)) |
|
35 | 35 | { |
36 | 36 | $expr = [ |
37 | - $filter->compare( '==', 'attribute.type.code', $codes ), |
|
37 | + $filter->compare('==', 'attribute.type.code', $codes), |
|
38 | 38 | $filter->getConditions(), |
39 | 39 | ]; |
40 | - $filter->setConditions( $filter->combine( '&&', $expr ) ); |
|
40 | + $filter->setConditions($filter->combine('&&', $expr)); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | return $filter; |
@@ -53,15 +53,15 @@ discard block |
||
53 | 53 | */ |
54 | 54 | public function createFilter() |
55 | 55 | { |
56 | - $filter = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'attribute' )->createSearch( true ); |
|
56 | + $filter = \Aimeos\MShop\Factory::createManager($this->getContext(), 'attribute')->createSearch(true); |
|
57 | 57 | |
58 | 58 | $expr = array( |
59 | - $filter->compare( '==', 'attribute.domain', 'product' ), |
|
59 | + $filter->compare('==', 'attribute.domain', 'product'), |
|
60 | 60 | $filter->getConditions(), |
61 | 61 | ); |
62 | 62 | |
63 | - $filter->setConditions( $filter->combine( '&&', $expr ) ); |
|
64 | - $filter->setSortations( array( $filter->sort( '+', 'attribute.position' ) ) ); |
|
63 | + $filter->setConditions($filter->combine('&&', $expr)); |
|
64 | + $filter->setSortations(array($filter->sort('+', 'attribute.position'))); |
|
65 | 65 | |
66 | 66 | return $filter; |
67 | 67 | } |
@@ -75,9 +75,9 @@ discard block |
||
75 | 75 | * @return \Aimeos\MShop\Attribute\Item\Iface Attribute item including the referenced domains items |
76 | 76 | * @since 2017.03 |
77 | 77 | */ |
78 | - public function getItem( $id, array $domains = array( 'media', 'price', 'text' ) ) |
|
78 | + public function getItem($id, array $domains = array('media', 'price', 'text')) |
|
79 | 79 | { |
80 | - return \Aimeos\MShop\Factory::createManager( $this->getContext(), 'attribute' )->getItem( $id, $domains, true ); |
|
80 | + return \Aimeos\MShop\Factory::createManager($this->getContext(), 'attribute')->getItem($id, $domains, true); |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | |
@@ -89,20 +89,20 @@ discard block |
||
89 | 89 | * @return \Aimeos\MShop\Attribute\Item\Iface[] Associative list of attribute item including the referenced domains items |
90 | 90 | * @since 2017.03 |
91 | 91 | */ |
92 | - public function getItems( array $ids, array $domains = array( 'media', 'price', 'text' ) ) |
|
92 | + public function getItems(array $ids, array $domains = array('media', 'price', 'text')) |
|
93 | 93 | { |
94 | - $manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'attribute' ); |
|
94 | + $manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'attribute'); |
|
95 | 95 | |
96 | - $filter = $manager->createSearch( true ); |
|
96 | + $filter = $manager->createSearch(true); |
|
97 | 97 | $expr = [ |
98 | - $filter->compare( '==', 'attribute.domain', 'product' ), |
|
99 | - $filter->compare( '==', 'attribute.id', $ids ), |
|
98 | + $filter->compare('==', 'attribute.domain', 'product'), |
|
99 | + $filter->compare('==', 'attribute.id', $ids), |
|
100 | 100 | $filter->getConditions(), |
101 | 101 | ]; |
102 | - $filter->setConditions( $filter->combine( '&&', $expr ) ); |
|
103 | - $filter->setSortations( array( $filter->sort( '+', 'attribute.position' ) ) ); |
|
102 | + $filter->setConditions($filter->combine('&&', $expr)); |
|
103 | + $filter->setSortations(array($filter->sort('+', 'attribute.position'))); |
|
104 | 104 | |
105 | - return $manager->searchItems( $filter, $domains ); |
|
105 | + return $manager->searchItems($filter, $domains); |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | |
@@ -115,8 +115,8 @@ discard block |
||
115 | 115 | * @return array Ordered list of attribute items implementing \Aimeos\MShop\Attribute\Item\Iface |
116 | 116 | * @since 2017.03 |
117 | 117 | */ |
118 | - public function searchItems( \Aimeos\MW\Criteria\Iface $filter, array $domains = array( 'media', 'price', 'text' ), &$total = null ) |
|
118 | + public function searchItems(\Aimeos\MW\Criteria\Iface $filter, array $domains = array('media', 'price', 'text'), &$total = null) |
|
119 | 119 | { |
120 | - return \Aimeos\MShop\Factory::createManager( $this->getContext(), 'attribute' )->searchItems( $filter, $domains, $total ); |
|
120 | + return \Aimeos\MShop\Factory::createManager($this->getContext(), 'attribute')->searchItems($filter, $domains, $total); |
|
121 | 121 | } |
122 | 122 | } |