mirror of
https://github.com/hauke68/Magallanes.git
synced 2025-09-17 22:30:16 +02:00
Getting linked entities.
This commit is contained in:
parent
d52927fe07
commit
ce2da4e270
@ -13,7 +13,10 @@ use Mage\Task\SkipException;
|
|||||||
*/
|
*/
|
||||||
class LinkSharedFilesTask extends AbstractTask implements IsReleaseAware
|
class LinkSharedFilesTask extends AbstractTask implements IsReleaseAware
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Linked folders parameter name
|
||||||
|
*/
|
||||||
|
const LINKED_FILES = 'linked_files';
|
||||||
/**
|
/**
|
||||||
* Linked folders parameter name
|
* Linked folders parameter name
|
||||||
*/
|
*/
|
||||||
@ -58,13 +61,12 @@ class LinkSharedFilesTask extends AbstractTask implements IsReleaseAware
|
|||||||
*/
|
*/
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
$linkedFiles = $this->getParameter('linked_files', array());
|
$linkedEntities = array_merge(
|
||||||
$linkedFolders = $this->getParameter(self::LINKED_FOLDERS, array());
|
$this->getParameter(self::LINKED_FILES, array()),
|
||||||
$linkingStrategy = $this->getParameter(self::LINKED_STRATEGY, self::ABSOLUTE_LINKING);
|
$this->getParameter(self::LINKED_FOLDERS, array())
|
||||||
|
);
|
||||||
|
|
||||||
$linkedEntities = array_merge($linkedFiles, $linkedFolders);
|
if (empty($linkedEntities)) {
|
||||||
|
|
||||||
if (empty($linkedFiles) && empty($linkedFolders)) {
|
|
||||||
throw new SkipException('No files and folders configured for sym-linking.');
|
throw new SkipException('No files and folders configured for sym-linking.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user