• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP rex_addon类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中rex_addon的典型用法代码示例。如果您正苦于以下问题:PHP rex_addon类的具体用法?PHP rex_addon怎么用?PHP rex_addon使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了rex_addon类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct($exceptions = false)
 {
     $addon = rex_addon::get('phpmailer');
     $this->From = $addon->getConfig('from');
     $this->FromName = $addon->getConfig('fromname');
     $this->ConfirmReadingTo = $addon->getConfig('confirmto');
     $this->Mailer = $addon->getConfig('mailer');
     $this->Host = $addon->getConfig('host');
     $this->Port = $addon->getConfig('port');
     $this->CharSet = $addon->getConfig('charset');
     $this->WordWrap = $addon->getConfig('wordwrap');
     $this->Encoding = $addon->getConfig('encoding');
     if ($addon->getConfig('priority') == 0) {
         $this->Priority = null;
     } else {
         $this->Priority = $addon->getConfig('priority');
     }
     $this->SMTPDebug = $addon->getConfig('smtp_debug');
     $this->SMTPSecure = $addon->getConfig('smtpsecure');
     $this->SMTPAuth = $addon->getConfig('smtpauth');
     $this->Username = $addon->getConfig('username');
     $this->Password = $addon->getConfig('password');
     if ($bcc = $addon->getConfig('bcc')) {
         $this->AddBCC($bcc);
     }
     $this->PluginDir = $addon->getPath('lib/phpmailer/');
     parent::__construct($exceptions);
 }
开发者ID:DECAF,项目名称:redaxo,代码行数:28,代码来源:mailer.php


示例2: createArchives

 private function createArchives()
 {
     $path = rex_path::base('releases/' . $this->version . '/');
     if (file_exists($path)) {
         rex_dir::deleteFiles($path);
     }
     rex_dir::create($path);
     $complete = new ZipArchive();
     $update = new ZipArchive();
     $complete->open($path . 'redaxo_' . $this->version . '.zip', ZipArchive::CREATE);
     $update->open($path . 'redaxo_update_' . $this->version . '.zip', ZipArchive::CREATE);
     $files = ['assets/.redaxo', 'media/.redaxo', 'redaxo/cache/.htaccess', 'redaxo/cache/.redaxo', 'redaxo/data/.htaccess', 'redaxo/data/.redaxo', 'redaxo/src/.htaccess', 'redaxo/index.php', 'index.php', 'LICENSE.md', 'README.md'];
     foreach ($files as $file) {
         $complete->addFile(rex_path::base($file), $file);
     }
     $this->addDir($complete, rex_path::core(), 'redaxo/src/core');
     $this->addDir($update, rex_path::core(), 'core');
     foreach (self::$addons as $addon) {
         $this->addDir($complete, rex_path::addon($addon), 'redaxo/src/addons/' . $addon);
         $this->addDir($update, rex_path::addon($addon), 'addons/' . $addon);
     }
     $this->addDir($complete, rex_path::core('assets'), 'assets');
     $addon = rex_addon::get('be_style');
     $this->addDir($complete, $addon->getPath('assets'), 'assets/addons/be_style');
     $this->addDir($complete, $addon->getPlugin('redaxo')->getPath('assets'), 'assets/addons/be_style/plugins/redaxo');
     $files = (require $addon->getPath('vendor_files.php'));
     foreach ($files as $source => $destination) {
         $complete->addFile($addon->getPath($source), 'assets/addons/be_style/' . $destination);
     }
     $complete->close();
     $update->close();
 }
开发者ID:staabm,项目名称:redaxo,代码行数:32,代码来源:release.php


示例3: exists

 /**
  * Returns if the package exists.
  *
  * @param string $packageId Package ID
  *
  * @return bool
  */
 public static function exists($packageId)
 {
     $package = explode('/', $packageId);
     if (isset($package[1])) {
         return rex_plugin::exists($package[0], $package[1]);
     }
     return rex_addon::exists($package[0]);
 }
开发者ID:staabm,项目名称:redaxo,代码行数:15,代码来源:package.php


示例4: getWidget

 public static function getWidget($id, $name, $value, array $args = [])
 {
     $open_params = '';
     if (isset($args['category']) && ($category = (int) $args['category'])) {
         $open_params .= '&rex_file_category=' . $category;
     }
     foreach ($args as $aname => $avalue) {
         $open_params .= '&args[' . $aname . ']=' . urlencode($avalue);
     }
     $wdgtClass = ' rex-js-widget-medialist';
     if (isset($args['preview']) && $args['preview']) {
         $wdgtClass .= ' rex-js-widget-preview';
         if (rex_addon::get('media_manager')->isAvailable()) {
             $wdgtClass .= ' rex-js-widget-preview-media-manager';
         }
     }
     $options = '';
     $medialistarray = explode(',', $value);
     if (is_array($medialistarray)) {
         foreach ($medialistarray as $file) {
             if ($file != '') {
                 $options .= '<option value="' . $file . '">' . $file . '</option>';
             }
         }
     }
     $disabled = ' disabled';
     $open_func = '';
     $add_func = '';
     $delete_func = '';
     $view_func = '';
     if (rex::getUser()->getComplexPerm('media')->hasMediaPerm()) {
         $disabled = '';
         $open_func = 'openREXMedialist(' . $id . ',\'' . $open_params . '\');';
         $add_func = 'addREXMedialist(' . $id . ',\'' . $open_params . '\');';
         $delete_func = 'deleteREXMedialist(' . $id . ');';
         $view_func = 'viewREXMedialist(' . $id . ',\'' . $open_params . '\');';
     }
     $e = [];
     $e['before'] = '<div class="rex-js-widget' . $wdgtClass . '">';
     $e['field'] = '<select class="form-control" name="REX_MEDIALIST_SELECT[' . $id . ']" id="REX_MEDIALIST_SELECT_' . $id . '" size="8">' . $options . '</select><input type="hidden" name="' . $name . '" id="REX_MEDIALIST_' . $id . '" value="' . $value . '" />';
     $e['moveButtons'] = '
             <a href="#" class="btn btn-popup" onclick="moveREXMedialist(' . $id . ',\'top\');return false;" title="' . rex_i18n::msg('var_medialist_move_top') . '"><i class="rex-icon rex-icon-top"></i></a>
             <a href="#" class="btn btn-popup" onclick="moveREXMedialist(' . $id . ',\'up\');return false;" title="' . rex_i18n::msg('var_medialist_move_up') . '"><i class="rex-icon rex-icon-up"></i></a>
             <a href="#" class="btn btn-popup" onclick="moveREXMedialist(' . $id . ',\'down\');return false;" title="' . rex_i18n::msg('var_medialist_move_down') . '"><i class="rex-icon rex-icon-down"></i></a>
             <a href="#" class="btn btn-popup" onclick="moveREXMedialist(' . $id . ',\'bottom\');return false;" title="' . rex_i18n::msg('var_medialist_move_bottom') . '"><i class="rex-icon rex-icon-bottom"></i></a>';
     $e['functionButtons'] = '
             <a href="#" class="btn btn-popup" onclick="' . $open_func . 'return false;" title="' . rex_i18n::msg('var_media_open') . '"' . $disabled . '><i class="rex-icon rex-icon-open-mediapool"></i></a>
             <a href="#" class="btn btn-popup" onclick="' . $add_func . 'return false;" title="' . rex_i18n::msg('var_media_new') . '"' . $disabled . '><i class="rex-icon rex-icon-add-media"></i></a>
             <a href="#" class="btn btn-popup" onclick="' . $delete_func . 'return false;" title="' . rex_i18n::msg('var_media_remove') . '"' . $disabled . '><i class="rex-icon rex-icon-delete-media"></i></a>
             <a href="#" class="btn btn-popup" onclick="' . $view_func . 'return false;" title="' . rex_i18n::msg('var_media_view') . '"' . $disabled . '><i class="rex-icon rex-icon-view-media"></i></a>';
     $e['after'] = '<div class="rex-js-media-preview"></div></div>';
     $fragment = new rex_fragment();
     $fragment->setVar('elements', [$e], false);
     $media = $fragment->parse('core/form/widget_list.php');
     return $media;
 }
开发者ID:skerbis,项目名称:redaxo,代码行数:56,代码来源:var_medialist.php


示例5: getParamFields

 public function getParamFields()
 {
     $fields = [['label' => rex_i18n::msg('im_export_filename'), 'name' => 'filename', 'type' => 'text', 'default' => self::DEFAULT_FILENAME, 'notice' => rex_i18n::msg('im_export_filename_notice')], ['name' => 'sendmail', 'type' => 'checkbox', 'options' => [1 => rex_i18n::msg('im_export_send_mail')]]];
     if (rex_addon::get('phpmailer')->isAvailable()) {
         $fields[] = ['label' => rex_i18n::msg('im_export_mailaddress'), 'name' => 'mailaddress', 'type' => 'text', 'visible_if' => ['sendmail' => 1]];
     } else {
         $fields[1]['notice'] = rex_i18n::msg('im_export_send_mail_notice');
         $fields[1]['attributes'] = ['disabled' => 'disabled'];
     }
     return $fields;
 }
开发者ID:skerbis,项目名称:redaxo,代码行数:11,代码来源:cronjob.php


示例6: getMyPackages

 public static function getMyPackages()
 {
     if (is_array(self::$myPackages)) {
         return self::$myPackages;
     }
     self::$myPackages = self::getPackages('?only_my=1');
     foreach (self::$myPackages as $key => $addon) {
         if (!rex_addon::exists($key)) {
             unset(self::$myPackages[$key]);
         }
     }
     return self::$myPackages;
 }
开发者ID:staabm,项目名称:redaxo,代码行数:13,代码来源:packages.php


示例7: __construct

 function __construct()
 {
     $this->addon_name = "rex5_multiupload";
     $this->addon = rex_addon::get('rex5_multiupload');
     $this->sync_cat = $this->addon->getProperty("sync_cats");
     $this->clear_uploadlist_automatically = $this->addon->getProperty("clear_uploadlist_automatically");
     $this->clear_file_after_finish = $this->addon->getProperty("clear_file_after_finish");
     $this->upload_simultaneously = $this->addon->getProperty("upload_simultaneously");
     $this->javascript_debug = $this->addon->getProperty("javascript_debug");
     $this->showFootnote = $this->addon->getProperty("show_footnote");
     $this->folder = $this->addon->getProperty("folder");
     $this->markup = $this->return_markup;
     $this->time = uniqid();
 }
开发者ID:darwin26,项目名称:rex5_multiupload,代码行数:14,代码来源:upload.class.php


示例8: getWidget

 public static function getWidget($id, $name, $value, array $args = [])
 {
     $open_params = '';
     if (isset($args['category']) && ($category = (int) $args['category'])) {
         $open_params .= '&amp;rex_file_category=' . $category;
     }
     foreach ($args as $aname => $avalue) {
         $open_params .= '&amp;args[' . urlencode($aname) . ']=' . urlencode($avalue);
     }
     $wdgtClass = ' rex-js-widget-media';
     if (isset($args['preview']) && $args['preview']) {
         $wdgtClass .= ' rex-js-widget-preview';
         if (rex_addon::get('media_manager')->isAvailable()) {
             $wdgtClass .= ' rex-js-widget-preview-media-manager';
         }
     }
     $disabled = ' disabled';
     $open_func = '';
     $add_func = '';
     $delete_func = '';
     $view_func = '';
     if (rex::getUser()->getComplexPerm('media')->hasMediaPerm()) {
         $disabled = '';
         $open_func = 'openREXMedia(' . $id . ',\'' . $open_params . '\');';
         $add_func = 'addREXMedia(' . $id . ',\'' . $open_params . '\');';
         $delete_func = 'deleteREXMedia(' . $id . ');';
         $view_func = 'viewREXMedia(' . $id . ',\'' . $open_params . '\');';
     }
     $e = [];
     $e['before'] = '<div class="rex-js-widget' . $wdgtClass . '">';
     $e['field'] = '<input class="form-control" type="text" name="' . $name . '" value="' . $value . '" id="REX_MEDIA_' . $id . '" readonly />';
     $e['functionButtons'] = '
             <a href="#" class="btn btn-popup" onclick="' . $open_func . 'return false;" title="' . rex_i18n::msg('var_media_open') . '"' . $disabled . '><i class="rex-icon rex-icon-open-mediapool"></i></a>
             <a href="#" class="btn btn-popup" onclick="' . $add_func . 'return false;" title="' . rex_i18n::msg('var_media_new') . '"' . $disabled . '><i class="rex-icon rex-icon-add-media"></i></a>
             <a href="#" class="btn btn-popup" onclick="' . $delete_func . 'return false;" title="' . rex_i18n::msg('var_media_remove') . '"' . $disabled . '><i class="rex-icon rex-icon-delete-media"></i></a>
             <a href="#" class="btn btn-popup" onclick="' . $view_func . 'return false;" title="' . rex_i18n::msg('var_media_view') . '"' . $disabled . '><i class="rex-icon rex-icon-view-media"></i></a>';
     $e['after'] = '<div class="rex-js-media-preview"></div></div>';
     $fragment = new rex_fragment();
     $fragment->setVar('elements', [$e], false);
     $media = $fragment->parse('core/form/widget.php');
     return $media;
 }
开发者ID:staabm,项目名称:redaxo,代码行数:42,代码来源:var_media.php


示例9: init

 /**
  * very basic setup steps, so everything is in place for our browser-based setup wizard.
  *
  * @param string $skinAddon
  * @param string $skinPlugin
  */
 public static function init($skinAddon = 'be_style', $skinPlugin = 'redaxo')
 {
     // initial purge all generated files
     rex_delete_cache();
     // delete backend session
     rex_backend_login::deleteSession();
     // copy alle media files of the current rex-version into redaxo_media
     rex_dir::copy(rex_path::core('assets'), rex_path::coreAssets());
     // copy skins files/assets
     $skinAddon = rex_addon::get($skinAddon);
     $skinPlugin = $skinAddon->getPlugin($skinPlugin);
     rex_dir::copy($skinAddon->getPath('assets'), $skinAddon->getAssetsPath());
     rex_dir::copy($skinPlugin->getPath('assets'), $skinPlugin->getAssetsPath());
     if (is_file($skinAddon->getPath('install.php'))) {
         $skinAddon->includeFile('install.php');
     }
     if (is_file($skinPlugin->getPath('install.php'))) {
         $skinPlugin->includeFile('install.php');
     }
 }
开发者ID:VIEWSION,项目名称:redaxo,代码行数:26,代码来源:setup.php


示例10: execute

 public function execute()
 {
     if (!rex::getUser()->isAdmin()) {
         throw new rex_api_exception('You do not have the permission!');
     }
     $addonkey = rex_request('addonkey', 'string');
     $upload = rex_request('upload', [['upload_file', 'bool'], ['oldversion', 'string'], ['redaxo', 'array[string]'], ['description', 'string'], ['status', 'int'], ['replace_assets', 'bool'], ['ignore_tests', 'bool']]);
     $file = [];
     $archive = null;
     $file['version'] = $upload['upload_file'] ? rex_addon::get($addonkey)->getVersion() : $upload['oldversion'];
     $file['redaxo_versions'] = $upload['redaxo'];
     $file['description'] = $upload['description'];
     $file['status'] = $upload['status'];
     try {
         if ($upload['upload_file']) {
             $archive = rex_path::addonCache('install', md5($addonkey . time()) . '.zip');
             $exclude = [];
             if ($upload['replace_assets']) {
                 $exclude[] = 'assets';
             }
             if ($upload['ignore_tests']) {
                 $exclude[] = 'tests';
             }
             rex_install_archive::copyDirToArchive(rex_path::addon($addonkey), $archive, null, $exclude);
             if ($upload['replace_assets']) {
                 rex_install_archive::copyDirToArchive(rex_url::addonAssets($addonkey), $archive, $addonkey . '/assets');
             }
             $file['checksum'] = md5_file($archive);
         }
         rex_install_webservice::post(rex_install_packages::getPath('?package=' . $addonkey . '&file_id=' . rex_request('file', 'int', 0)), ['file' => $file], $archive);
     } catch (rex_functional_exception $e) {
         throw new rex_api_exception($e->getMessage());
     }
     if ($archive) {
         rex_file::delete($archive);
     }
     unset($_REQUEST['addonkey']);
     unset($_REQUEST['file']);
     rex_install_packages::deleteCache();
     return new rex_api_result(true, rex_i18n::msg('install_info_addon_uploaded', $addonkey));
 }
开发者ID:staabm,项目名称:redaxo,代码行数:41,代码来源:api_package_upload.php


示例11:

<?php

if (rex_addon::get('cronjob')->isAvailable()) {
    rex_cronjob_manager::registerType('rex_cronjob_export');
}
开发者ID:staabm,项目名称:redaxo,代码行数:5,代码来源:boot.php


示例12:

        <br/>
Datei anh&#228;ngen: </strong>REX_MEDIA[id=1 widget=1]</div>
    <div style="clear:both"></div>
  </div>
  <div class="formgenheadline">E-Mail-Best&#228;tigungstext</div>
  <div class="col-md-12 doform"><textarea name="REX_INPUT_VALUE[5]" class="formgenconfig" style="width:100%;height:80px;">REX_VALUE[5]</textarea>
    <span class="formgen_sample1"><strong>Platzhalter für Bestätigungstext:</strong> <br />
    %Betreff%, %Datum% , %Zeit%, %Absender%, %Mail%, %Vorname%, %Nachname% </span>, <br />
    %Besuchermail% (wird durch sender gesetzt)<br/>
  </div>
</div>
  <br/>
  
  <h2><strong>Bestätigung auf Website</strong></h2>
 <?php 
$tinycheck = rex_addon::get($weditor)->isAvailable();
if ($tinycheck == 1) {
    ?>
 
   <textarea id="redactor_REX_SLICE_ID"name="REX_INPUT_VALUE[6]" class="<?php 
    echo $editstyle;
    ?>
 form-control" style="width:555px; height:250px;">REX_VALUE[6]</textarea>
   
<?php 
} else {
    echo ' <div class="formgenerror"> Editor wurde nicht gefunden. <br/> Bitte installieren Sie ein geeignetes ADDON! <br/>z.B: TinyMCE, redactor oder CKEDITOR </div>';
}
?>
   
   
开发者ID:skerbis,项目名称:do-form,代码行数:29,代码来源:input.php


示例13: getImageTypes

 public static function getImageTypes()
 {
     return rex_addon::get('mediapool')->getProperty('image_extensions');
 }
开发者ID:DECAF,项目名称:redaxo,代码行数:4,代码来源:media.php


示例14: setProperty

 /**
  * @override
  * @see redaxo/include/classes/rex_addon#setProperty($addon, $property, $value)
  */
 static function setProperty($addon, $plugin, $property, $value = null)
 {
     return parent::setProperty(array($addon, $plugin), $property, $value);
 }
开发者ID:Barnhiac,项目名称:MTW_REDAXO,代码行数:8,代码来源:class.ooplugin.inc.php


示例15: function

     $titleLink = '<a id="erledigtverbergen" class="erledigtschalter" title="Erledigte Aufgaben verbergen" href="javascript:void(0);"><i class="rex-icon fa-eye-slash"></a>';
 } else {
     $titleLink = '<a id="erledigtanzeigen" class="erledigtschalter" title="Erledigte Aufgaben anzeigen" href="javascript:void(0);"><i class="rex-icon fa-eye"></a>';
 }
 $list->setColumnLabel('titel', 'Aufgaben ' . $titleLink);
 $list->setColumnLayout('titel', ['<th>###VALUE###</th>', '<td data-title="Aufgaben" class="td_aufgaben">###VALUE###</td>']);
 $list->setColumnFormat('titel', 'custom', function ($params) {
     $list = $params['list'];
     if ($list->getValue('beschreibung') != '') {
         $aufgabe = '<div class="collapsetitel" data-toggle="collapse" data-target="#collapse###id###">' . $list->getValue('titel') . '</div>';
     } else {
         $aufgabe = $list->getValue('titel');
     }
     if ($list->getValue('beschreibung')) {
         $text = htmlspecialchars_decode($list->getValue('beschreibung'));
         if (rex_addon::get('textile')->isAvailable()) {
             $text = str_replace('<br />', '', $text);
             $text = rex_textile::parse($text);
             $text = str_replace('###', '&#x20;', $text);
         } else {
             $text = str_replace(PHP_EOL, '<br/>', $text);
         }
         $user_name = rex::getUser()->getValue('name') != '' ? rex::getUser()->getValue('name') : rex::getUser()->getValue('login');
         $text = str_replace('*****', '<div class="aufgabentrenner">' . date("d.m.y") . ' - ' . htmlspecialchars($user_name) . '</div>', $text);
         $beschreibung = '<div id="collapse###id###" class="collapse"><br/>' . $text . '</div>';
     } else {
         $beschreibung = '';
     }
     $aufgabe .= $beschreibung;
     return $aufgabe;
 });
开发者ID:phoebusryan,项目名称:aufgaben,代码行数:31,代码来源:aufgaben.php


示例16: synchronizeWithFileSystem

 /**
  * Synchronizes the packages with the file system.
  */
 public static function synchronizeWithFileSystem()
 {
     $config = rex::getConfig('package-config');
     $addons = self::readPackageFolder(rex_path::src('addons'));
     $registeredAddons = array_keys(rex_addon::getRegisteredAddons());
     foreach (array_diff($registeredAddons, $addons) as $addonName) {
         $manager = rex_addon_manager::factory(rex_addon::get($addonName));
         $manager->_delete(true);
         unset($config[$addonName]);
     }
     foreach ($addons as $addonName) {
         if (!rex_addon::exists($addonName)) {
             $config[$addonName]['install'] = false;
             $config[$addonName]['status'] = false;
             $registeredPlugins = [];
         } else {
             $addon = rex_addon::get($addonName);
             $config[$addonName]['install'] = $addon->isInstalled();
             $config[$addonName]['status'] = $addon->isAvailable();
             $registeredPlugins = array_keys($addon->getRegisteredPlugins());
         }
         $plugins = self::readPackageFolder(rex_path::addon($addonName, 'plugins'));
         foreach (array_diff($registeredPlugins, $plugins) as $pluginName) {
             $manager = rex_plugin_manager::factory(rex_plugin::get($addonName, $pluginName));
             $manager->_delete(true);
             unset($config[$addonName]['plugins'][$pluginName]);
         }
         foreach ($plugins as $pluginName) {
             $plugin = rex_plugin::get($addonName, $pluginName);
             $config[$addonName]['plugins'][$pluginName]['install'] = $plugin->isInstalled();
             $config[$addonName]['plugins'][$pluginName]['status'] = $plugin->getProperty('status');
         }
         if (isset($config[$addonName]['plugins']) && is_array($config[$addonName]['plugins'])) {
             ksort($config[$addonName]['plugins']);
         }
     }
     ksort($config);
     rex::setConfig('package-config', $config);
     rex_addon::initialize();
 }
开发者ID:DECAF,项目名称:redaxo,代码行数:43,代码来源:manager.php


示例17: addLinklistField

 /**
  * Fuegt dem Formular ein Feld hinzu mit dem die Struktur-Verwaltung angebunden werden kann.
  * Damit koennen mehrere Elemente aus der Struktur eingefuegt werden.
  *
  * @param string $name
  * @param mixed  $value
  * @param array  $attributes
  *
  * @throws rex_exception
  *
  * @return rex_form_widget_linklist_element
  */
 public function addLinklistField($name, $value = null, array $attributes = [])
 {
     if (!rex_addon::get('structure')->isAvailable()) {
         throw new rex_exception(__METHOD__ . '() needs "structure" addon!');
     }
     $attributes['internal::fieldClass'] = 'rex_form_widget_linklist_element';
     $field = $this->addField('', $name, $value, $attributes, true);
     return $field;
 }
开发者ID:skerbis,项目名称:redaxo,代码行数:21,代码来源:form.php


示例18: str_replace

     if ($list->getValue('description') != '') {
         $aufgabe = '<div class="collapsetitle" data-toggle="collapse" data-target="#collapse###id###">' . $list->getValue('title') . '</div>';
     } else {
         $aufgabe = $list->getValue('title');
     }
     if ($list->getValue('description')) {
         $text = $list->getValue('description');
         if (rex_addon::get('textile')->isAvailable()) {
             $text = str_replace('<br />', '', $text);
             $text = rex_textile::parse($text);
             $text = str_replace('###', '&#x20;', $text);
         }
         if (rex_addon::get('rex_markitup')->isAvailable()) {
             $text = rex_markitup::parseOutput('textile', $text);
         }
         if (!rex_addon::get('rex_markitup')->isAvailable() and !rex_addon::get('textile')->isAvailable()) {
             $text = str_replace(PHP_EOL, '<br/>', $text);
         }
         $user_name = rex::getUser()->getValue('login');
         $beschreibung = '<div id="collapse###id###" class="collapse"><br/>' . $text . '</div>';
     } else {
         $beschreibung = '';
     }
     $aufgabe .= $beschreibung;
     return $aufgabe;
 });
 // --------------------
 //
 //  UpdateDate
 //
 // --------------------
开发者ID:FriendsOfREDAXO,项目名称:aufgaben,代码行数:31,代码来源:aufgaben.php


示例19: str_replace

             <td colspan="2">
             ' . $checkbox . '
             </td>
             <td colspan="4">
             ' . $field . '
             </td>
         </tr>
         </tfoot>
     ';
 }
 $where = 'f.category_id=' . $rex_file_category;
 $addTable = '';
 if ($media_name != '') {
     $media_name = str_replace(['_', '%'], ['\\_', '\\%'], $media_name);
     $where = "(f.filename LIKE '%" . $media_name . "%' OR f.title LIKE '%" . $media_name . "%')";
     if (rex_addon::get('mediapool')->getConfig('searchmode', 'local') != 'global' && $rex_file_category != 0) {
         $addTable = rex::getTablePrefix() . 'media_category c, ';
         $where .= ' AND f.category_id = c.id ';
         $where .= " AND (c.path LIKE '%|" . $rex_file_category . "|%' OR c.id=" . $rex_file_category . ') ';
     }
 }
 if (isset($args['types'])) {
     $types = [];
     foreach (explode(',', $args['types']) as $type) {
         $types[] = 'LOWER(RIGHT(f.filename, LOCATE(".", REVERSE(f.filename))-1))="' . strtolower(htmlspecialchars($type)) . '"';
     }
     $where .= ' AND (' . implode(' OR ', $types) . ')';
 }
 $qry = 'SELECT * FROM ' . $addTable . rex::getTablePrefix() . 'media f WHERE ' . $where . ' ORDER BY f.updatedate desc, f.id desc';
 // ----- EXTENSION POINT
 $qry = rex_extension::registerPoint(new rex_extension_point('MEDIA_LIST_QUERY', $qry, ['category_id' => $rex_file_category]));
开发者ID:alsahh,项目名称:redaxo,代码行数:31,代码来源:media.php


示例20: checkRequirements

 /**
  * @param string      $temppath
  * @param string      $version
  * @param rex_addon[] $addons
  *
  * @throws rex_functional_exception
  */
 private function checkRequirements($temppath, $version, array $addons)
 {
     // ---- update "version", "requires" and "conflicts" properties
     $coreVersion = rex::getVersion();
     rex::setProperty('version', $version);
     $versions = new SplObjectStorage();
     $requirements = new SplObjectStorage();
     $conflicts = new SplObjectStorage();
     foreach ($addons as $addonkey => $config) {
         $addon = rex_addon::get($addonkey);
         $addonPath = $temppath . 'addons/' . $addonkey . '/';
         if (isset($config['requires'])) {
             $requirements[$addon] = $addon->getProperty('requires');
             $addon->setProperty('requires', $config['requires']);
         }
         if (isset($config['conflicts'])) {
             $conflicts[$addon] = $addon->getProperty('conflicts');
             $addon->setProperty('conflicts', $config['conflicts']);
         }
         $versions[$addon] = $addon->getVersion();
         $addon->setProperty('version', $config['version']);
         foreach ($addon->getAvailablePlugins() as $plugin) {
             if (is_dir($addonPath . 'plugins/' . $plugin->getName())) {
                 $config = rex_file::getConfig($addonPath . 'plugins/' . $plugin->getName() . '/' . rex_package::FILE_PACKAGE);
                 if (isset($config['requires'])) {
                     $requirements[$plugin] = $plugin->getProperty('requires');
                     $plugin->setProperty('requires', $config['requires']);
                 }
                 if (isset($config['conflicts'])) {
                     $conflicts[$plugin] = $plugin->getProperty('conflicts');
                     $plugin->setProperty('conflicts', $config['conflicts']);
                 }
                 if (isset($config['version'])) {
                     $versions[$plugin] = $plugin->getProperty('version');
                     $plugin->setProperty('requires', $config['version']);
                 }
             }
         }
     }
     // ---- check requirements
     $messages = [];
     foreach (rex_package::getAvailablePackages() as $package) {
         $manager = rex_package_manager::factory($package);
         if (!$manager->checkRequirements()) {
             $messages[] = $package->getPackageId() . ': ' . $manager->getMessage();
         } elseif (!$manager->checkConflicts()) {
             $messages[] = $package->getPackageId() . ': ' . $manager->getMessage();
         }
     }
     // ---- reset "version", "requires" and "conflicts" properties
     rex::setProperty('version', $coreVersion);
     foreach ($versions as $package) {
         $package->setProperty('version', $versions[$package]);
     }
     foreach ($requirements as $package) {
         $package->setProperty('requires', $requirements[$package]);
     }
     foreach ($conflicts as $package) {
         $package->setProperty('conflicts', $conflicts[$package]);
     }
     if (!empty($messages)) {
         throw new rex_functional_exception(implode('<br />', $messages));
     }
 }
开发者ID:VIEWSION,项目名称:redaxo,代码行数:71,代码来源:api_core_update.php



注:本文中的rex_addon类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP rex_article类代码示例发布时间:2022-05-23
下一篇:
PHP rex类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap