Пример #1
0
        }
    } elseif ($imageAliases != false) {
        // Provided image alias settings
        $aliases = $imageAliases;
    }
}
// Default datatypes to create image alias variations
$imageDataTypeStrings = eZINI::instance('bcimagealias.ini')->variable('BCImageAliasSettings', 'ImageDataTypeStringList');
if (!is_array($imageDataTypeStrings)) {
    $cli->warning("You must enable the bcimagealias extension for the default siteaccess first and clear all ini caches to use this extension script");
    $cli->output();
    // Shutdown the script and exit eZ
    $script->shutdown(1);
}
// Fetch content class image attributes
$contentClassImageAttributes = BCImageAlias::fetchContentClassImageAttributes();
// Perform node / all specific operations
if ($nodeID != false && !$objectID || !$objectID && !$nodeID) {
    // Fetch content object image attributes
    $fetchContentClassImageAttributesFirstVersion = false;
    $contentObjectImageAttributes = BCImageAlias::fetchImageAttributesByClassAttributes($contentClassImageAttributes, $fetchContentClassImageAttributesFirstVersion);
    $contentObjectImageAttributesCount = count($contentObjectImageAttributes);
    // Estimated image alias variations
    // Based on the number of image aliases in the current siteaccess
    // defined in current siteaccess settings * the number of content
    // object attribute datatype images (number of images used within eZ Publish Content Trees)
    $imageAliasVariationCount = $contentObjectImageAttributesCount * count($aliases) * count($imageDataTypeStrings);
    $script->resetIteration($imageAliasVariationCount);
} elseif ($objectID != false && !$nodeID) {
    /**
     * Fetch content object