1 | <?php |
||
36 | class FileUploadObserver extends AbstractProductImportObserver |
||
37 | { |
||
38 | |||
39 | /** |
||
40 | * Will be invoked by the action on the events the listener has been registered for. |
||
41 | * |
||
42 | * @param array $row The row to handle |
||
43 | * |
||
44 | * @return array The modified row |
||
45 | * @see \TechDivision\Import\Product\Observers\ImportObserverInterface::handle() |
||
46 | */ |
||
47 | public function handle(array $row) |
||
64 | |||
65 | /** |
||
66 | * Upload's the file with the passed name to the Magento |
||
67 | * media directory. If the file already exists, the will |
||
68 | * be given a new name that will be returned. |
||
69 | * |
||
70 | * @param string $filename The name of the file to be uploaded |
||
71 | * |
||
72 | * @return string The name of the uploaded file |
||
73 | */ |
||
74 | public function uploadFile($filename) |
||
78 | |||
79 | /** |
||
80 | * Return's the name of the created image. |
||
81 | * |
||
82 | * @return string The name of the created image |
||
83 | */ |
||
84 | public function getParentImage() |
||
88 | |||
89 | /** |
||
90 | * Return's TRUE if the passed image is the parent one. |
||
91 | * |
||
92 | * @param string $image The imageD to check |
||
93 | * |
||
94 | * @return boolean TRUE if the passed image is the parent one |
||
95 | */ |
||
96 | public function isParentImage($image) |
||
100 | } |
||
101 |