AnalyticsServiceExportUI.class.php in Analytics 7
File
lib/export_ui/AnalyticsServiceExportUI.class.php
View source
<?php
class AnalyticsServiceExportUI extends ctools_export_ui {
function access($op, $item) {
if (in_array($op, array(
'add',
'import',
)) && !analytics_service_add_service_options()) {
return FALSE;
}
if ($op == 'clone') {
return FALSE;
}
if (!empty($item->locked)) {
return FALSE;
}
return parent::access($op, $item);
}
function build_operations($item) {
$operations = parent::build_operations($item);
foreach ($operations as $op => $operation) {
if ($op == 'enable' || $op == 'disable') {
continue;
}
elseif (!$this
->access($op, $item)) {
unset($operations[$op]);
}
}
return $operations;
}
}