1 | <?php |
||
40 | class BunchSubject extends AbstractCategorySubject implements ExportableSubjectInterface, FileUploadSubjectInterface |
||
41 | { |
||
42 | |||
43 | /** |
||
44 | * The trait that implements the export functionality. |
||
45 | * |
||
46 | * @var \TechDivision\Import\Subjects\ExportableTrait |
||
47 | */ |
||
48 | use ExportableTrait; |
||
49 | |||
50 | /** |
||
51 | * The trait that provides file upload functionality. |
||
52 | * |
||
53 | * @var \TechDivision\Import\Subjects\FileUploadTrait |
||
54 | */ |
||
55 | use FileUploadTrait; |
||
56 | |||
57 | /** |
||
58 | * The array with the available display mode keys. |
||
59 | * |
||
60 | * @var array |
||
61 | */ |
||
62 | protected $availableDisplayModes = array( |
||
63 | 'Products only' => DisplayModeKeys::DISPLAY_MODE_PRODUCTS_ONLY, |
||
64 | 'Static block only' => DisplayModeKeys::DISPLAY_MODE_STATIC_BLOCK_ONLY, |
||
65 | 'Static block and products' => DisplayModeKeys::DISPLAY_MODE_BOTH |
||
66 | ); |
||
67 | |||
68 | /** |
||
69 | * The array with the available page layout keys. |
||
70 | * |
||
71 | * @var array |
||
72 | */ |
||
73 | protected $availablePageLayouts = array( |
||
74 | '1 column' => PageLayoutKeys::PAGE_LAYOUT_1_COLUMN, |
||
75 | '2 columns with left bar' => PageLayoutKeys::PAGE_LAYOUT_2_COLUMNS_LEFT, |
||
76 | '2 columns with right bar' => PageLayoutKeys::PAGE_LAYOUT_2_COLUMNS_RIGHT, |
||
77 | '3 columns' => PageLayoutKeys::PAGE_LAYOUT_3_COLUMNS, |
||
78 | 'Empty' => PageLayoutKeys::PAGE_LAYOUT_EMPTY |
||
79 | ); |
||
80 | /** |
||
81 | * The default callback mappings for the Magento standard category attributes. |
||
82 | * |
||
83 | * @var array |
||
84 | */ |
||
85 | protected $defaultCallbackMappings = array( |
||
86 | 'display_mode' => array('import_category.callback.display.mode'), |
||
87 | 'page_layout' => array('import_category.callback.page.layout'), |
||
88 | ); |
||
89 | |||
90 | /** |
||
91 | * Intializes the previously loaded global data for exactly one bunch. |
||
92 | * |
||
93 | * @param string $serial The serial of the actual import |
||
94 | * |
||
95 | * @return void |
||
96 | */ |
||
97 | public function setUp($serial) |
||
126 | |||
127 | /** |
||
128 | * Return's the default callback mappings. |
||
129 | * |
||
130 | * @return array The default callback mappings |
||
131 | */ |
||
132 | public function getDefaultCallbackMappings() |
||
136 | |||
137 | /** |
||
138 | * Return's the display mode for the passed display mode string. |
||
139 | * |
||
140 | * @param string $displayMode The display mode string to return the key for |
||
141 | * |
||
142 | * @return integer The requested display mode |
||
143 | * @throws \Exception Is thrown, if the requested display mode is not available |
||
144 | */ |
||
145 | public function getDisplayModeByValue($displayMode) |
||
156 | |||
157 | /** |
||
158 | * Return's the page layout for the passed page layout string. |
||
159 | * |
||
160 | * @param string $pageLayout The page layout string to return the key for |
||
161 | * |
||
162 | * @return integer The requested page layout |
||
163 | * @throws \Exception Is thrown, if the requested page layout is not available |
||
164 | */ |
||
165 | public function getPageLayoutByValue($pageLayout) |
||
176 | } |
||
177 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: