errorMessage): ?>
= $this->errorMessage ?>
stats): ?>
= $this->form ?>
stats[$type];
if ((int) $stat->cnt_total === 0) {
return $self->translate('No object has been defined yet');
}
if ((int) $stat->cnt_total === 1) {
if ($stat->cnt_template > 0) {
$msg = $self->translate('One template has been defined');
} elseif ($stat->cnt_external > 0) {
$msg = $self->translate('One external object has been defined, it will not be deployed');
} else {
$msg = $self->translate('One object has been defined');
}
} else {
$msg = sprintf(
$self->translate('%d objects have been defined'),
$stat->cnt_total
);
}
$extra = array();
if ($stat->cnt_total !== $stat->cnt_object) {
if ($stat->cnt_template > 0) {
$extra[] = sprintf(
$self->translate('%d of them are templates'),
$stat->cnt_template
);
}
if ($stat->cnt_external > 0) {
$extra[] = sprintf(
$self->translate('%d have been externally defined and will not be deployed'),
$stat->cnt_external
);
}
}
if (array_key_exists($type . 'group', $self->stats)) {
$groupstat = $self->stats[$type . 'group'];
if ((int) $groupstat->cnt_total === 0) {
$extra[] = $self->translate('no related group exists');
} elseif ((int) $groupstat->cnt_total === 1) {
$extra[] = $self->translate('one related group exists');
} else {
$extra[] = sprintf(
$self->translate('%s related group objects have been created'),
$groupstat->cnt_total
);
}
}
if (empty($extra)) {
return $msg;
}
return $msg . ', ' . implode(', ', $extra);
}
function pendingDeployments($self) {
if ($self->undeployedActivities === 0) return '';
return '.