Ejemplo n.º 1
0
<?php

/** @var rex_addon $this */
ob_start();
require __DIR__ . '/../help.php';
$content = ob_get_contents();
ob_end_clean();
$fragment = new rex_fragment();
$fragment->setVar('title', rex_i18n::RawMsg('media_manager_overview_title', $this->getVersion()), false);
$fragment->setVar('body', $content, false);
$content = $fragment->parse('core/page/section.php');
echo $content;
Ejemplo n.º 2
0
    $list->setColumnParams($delete, ['type_id' => $type_id, 'effect_id' => '###id###', 'func' => 'delete']);
    $list->addLinkAttribute($delete, 'data-confirm', rex_i18n::msg('delete') . ' ?');
    $content = $list->get();
    $footer = '<a class="btn btn-back" href="' . rex_url::currentBackendPage() . '">' . rex_i18n::msg('media_manager_back') . '</a>';
    $fragment = new rex_fragment();
    $fragment->setVar('title', rex_i18n::RawMsg('media_manager_effect_caption', $typeName), false);
    $fragment->setVar('content', $content, false);
    $fragment->setVar('footer', $footer, false);
    $content = $fragment->parse('core/page/section.php');
    echo $content;
} elseif ($func == 'add' && $type_id > 0 || $func == 'edit' && $effect_id > 0 && $type_id > 0) {
    $effectNames = rex_media_manager::getSupportedEffectNames();
    if ($func == 'edit') {
        $formLabel = rex_i18n::RawMsg('media_manager_effect_edit_header', htmlspecialchars($typeName));
    } elseif ($func == 'add') {
        $formLabel = rex_i18n::RawMsg('media_manager_effect_create_header', htmlspecialchars($typeName));
    }
    $form = rex_form::factory(rex::getTablePrefix() . 'media_manager_type_effect', '', 'id=' . $effect_id);
    // image_type_id for reference to save into the db
    $form->addHiddenField('type_id', $type_id);
    // effect prio
    $field = $form->addPrioField('priority');
    $field->setLabel(rex_i18n::msg('media_manager_effect_priority'));
    $field->setLabelField('effect');
    $field->setWhereCondition('type_id = ' . $type_id);
    // effect name als SELECT
    $field = $form->addSelectField('effect');
    $field->setLabel(rex_i18n::msg('media_manager_effect_name'));
    $select = $field->getSelect();
    $select->addOptions($effectNames, true);
    $select->setSize(1);