当前位置: 首页>>代码示例>>PHP>>正文


PHP rex_addon类代码示例

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


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


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