Ejemplo n.º 1
0
$module = $Params['Module'];
$objectID = $Params['ObjectID'];
$object = false;
if (!isset($offset)) {
    $offset = false;
}
if (is_numeric($objectID)) {
    $object = eZContentObject::fetch($objectID);
}
if (!$object) {
    return $module->handleError(EZ_ERROR_KERNEL_NOT_AVAILABLE, 'kernel');
}
$collections = eZInformationCollection::fetchCollectionsList($objectID, false, false, array());
$numberOfCollections = eZInformationCollection::fetchCollectionsCount($objectID);
$objects = bccieExportUtils::getObjectsWithCollectedInformation();
$numberOfInfoCollectorObjects = bccieExportUtils::getCollectorObjectsCount();
$viewParameters = array('offset' => $offset);
$objectName = $object->attribute('name');
$tpl = eZTemplate::factory();
$tpl->setVariable('module', $module);
$tpl->setVariable('object', $object);
$tpl->setVariable('object_array', $objects);
$tpl->setVariable('object_count', $numberOfInfoCollectorObjects);
$tpl->setVariable('collection_array', $collections);
$tpl->setVariable('collection_count', $numberOfCollections);
if ($numberOfCollections >= 1) {
    $createdTimestamp = $collections[0]->attribute('created');
    $startDay = date('d', $createdTimestamp);
    $startMonth = date('m', $createdTimestamp);
    $startYear = date('Y', $createdTimestamp);
    $tpl->setVariable('start_day', $startDay);