1 | <?php |
||
35 | class UrlRewriteSubject extends AbstractProductSubject |
||
36 | { |
||
37 | |||
38 | /** |
||
39 | * The mapping for the SKU => visibility. |
||
40 | * |
||
41 | * @var array |
||
42 | */ |
||
43 | protected $entityIdVisibilityIdMapping = array(); |
||
44 | |||
45 | /** |
||
46 | * The array with the available visibility keys. |
||
47 | * |
||
48 | * @var array |
||
49 | */ |
||
50 | protected $availableVisibilities = array( |
||
51 | 'Not Visible Individually' => VisibilityKeys::VISIBILITY_NOT_VISIBLE, |
||
52 | 'Catalog' => VisibilityKeys::VISIBILITY_IN_CATALOG, |
||
53 | 'Search' => VisibilityKeys::VISIBILITY_IN_SEARCH, |
||
54 | 'Catalog, Search' => VisibilityKeys::VISIBILITY_BOTH |
||
55 | ); |
||
56 | |||
57 | /** |
||
58 | * Return's the visibility key for the passed visibility string. |
||
59 | * |
||
60 | * @param string $visibility The visibility string to return the key for |
||
61 | * |
||
62 | * @return integer The requested visibility key |
||
63 | * @throws \Exception Is thrown, if the requested visibility is not available |
||
64 | */ |
||
65 | public function getVisibilityIdByValue($visibility) |
||
81 | |||
82 | /** |
||
83 | * Return's the visibility for the passed entity ID, if it already has been mapped. The mapping will be created |
||
84 | * by calling <code>\TechDivision\Import\Product\Subjects\BunchSubject::getVisibilityIdByValue</code> which will |
||
85 | * be done by the <code>\TechDivision\Import\Product\Callbacks\VisibilityCallback</code>. |
||
86 | * |
||
87 | * @return integer The visibility ID |
||
88 | * @throws \Exception Is thrown, if the entity ID has not been mapped |
||
89 | * @see \TechDivision\Import\Product\Subjects\BunchSubject::getVisibilityIdByValue() |
||
90 | */ |
||
91 | public function getEntityIdVisibilityIdMapping() |
||
106 | |||
107 | /** |
||
108 | * Add the entity ID => visibility mapping for the actual entity ID. |
||
109 | * |
||
110 | * @param string $visibility The visibility of the actual entity to map |
||
111 | * |
||
112 | * @return void |
||
113 | */ |
||
114 | public function addEntityIdVisibilityIdMapping($visibility) |
||
118 | } |
||
119 |