public function EntityShareMedias::exportMedias in Entity Share 7
Export the medias of the providers.
File
- modules/
entity_share_medias/ includes/ entity_share_medias.inc, line 316 - Class for handling Medias.
Class
- EntityShareMedias
- Class EntityShareMedias.
Code
public function exportMedias() {
foreach ($this
->getMediaTypesConfig() as $type => $config) {
$class = $config['export'];
$provider = new $class($this->fieldData, $this->fieldName, $this->fieldType, $this->entity, $this->fieldInfo);
if (!$provider instanceof EntityShareMediasExportInterface) {
watchdog(self::WATCHDOG_TYPE, 'The media type %type class must implement EntityShareMediasProviderInterface interface !', array(
'%type' => $type,
), WATCHDOG_WARNING);
continue;
}
if ($provider
->isManagedFieldType()) {
$provider
->exportMedias();
}
}
}