223 if (!$this->certificateSettings->get(
'active')) {
224 $this->controller->redirect($this);
228 $this->
template->setBodyClass(
'iosMyCertificates');
230 $showMigrationBox = $this->migrationVisibleValidator->isMigrationAvailable(
234 if (!$migrationWasStarted &&
true === $showMigrationBox) {
235 $migrationUiEl = new \ilCertificateMigrationUIElements();
236 $startMigrationCommand = $this->controller->getLinkTargetByClass(
237 [
'ilCertificateMigrationGUI'],
238 'startMigrationAndReturnMessage',
243 $messageBoxHtml = $migrationUiEl->getMigrationMessageBox($startMigrationCommand);
245 $this->
template->setCurrentBlock(
'mess');
246 $this->
template->setVariable(
'MESSAGE', $messageBoxHtml);
247 $this->
template->parseCurrentBlock(
'mess');
254 $this->
language->txt(
'certificate_no_object_title')
259 $this->
user->getId(),
261 'order_field' => explode(
'_', $sorting)[0],
262 'order_direction' => explode(
'_', $sorting)[1]
269 if (count(
$data[
'items']) > 0) {
273 foreach ($this->sortationOptions as $fieldAndDirection => $lngVariable) {
277 $sortViewControl = $this->uiFactory
280 ->withLabel($this->
language->txt($this->sortationOptions[$sorting]))
281 ->withTargetURL($this->controller->getLinkTarget($this,
'applySortation'),
'sort_by');
282 $uiComponents[] = $sortViewControl;
284 foreach (
$data[
'items'] as $certificateData) {
285 $thumbnailImagePath = $certificateData[
'thumbnail_image_path'];
287 if ($thumbnailImagePath === null
288 || $thumbnailImagePath ===
'' 289 || !$this->filesystem->has($thumbnailImagePath)
294 $cardImage = $this->uiFactory->image()->standard(
296 $certificateData[
'title']
302 if (strlen($certificateData[
'description']) > 0) {
303 $sections[] = $this->uiFactory->listing()->descriptive([
304 $this->
language->txt(
'cert_description_label') => $certificateData[
'description']
311 $sections[] = $this->uiFactory->listing()->descriptive([
318 $objectTypeIcon = $this->uiFactory
320 ->standard($certificateData[
'obj_type'], $certificateData[
'obj_type'],
'small');
322 $objectTitle = $certificateData[
'title'];
324 if (count($refIds) > 0) {
325 foreach ($refIds as $refId) {
326 if ($this->access->checkAccess(
'read',
'', $refId)) {
327 $objectTitle = $this->uiRenderer->render(
335 $sections[] = $this->uiFactory->listing()->descriptive([$this->
language->txt(
'cert_object_label') => implode(
'', [
336 $this->uiRenderer->render($objectTypeIcon),
340 $this->controller->setParameter($this,
'certificate_id', $certificateData[
'id']);
341 $downloadHref = $this->controller->getLinkTarget($this,
'download');
342 $this->controller->clearParameters($this);
343 $sections[] = $this->uiFactory->button()->standard(
'Download', $downloadHref);
345 $card = $this->uiFactory
347 ->standard($certificateData[
'title'], $cardImage)
348 ->withSections($sections);
353 $deck = $this->uiFactory->deck($cards);
355 $uiComponents[] = $this->uiFactory->divider()->horizontal();
357 $uiComponents[] = $deck;
362 $this->
template->setContent($this->uiRenderer->render($uiComponents));
static setUseRelativeDates($a_status)
set use relative dates
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
static _getAllReferences($a_id)
get all reference ids of object
static useRelativeDates()
check if relative dates are used
Class ilCertificateMigration.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static signFile($path_to_file)
static getWebspaceDir($mode="filesystem")
get webspace directory
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")