當前位置: 首頁>>代碼示例>>PHP>>正文


PHP FabrikHelperHTML::isDebug方法代碼示例

本文整理匯總了PHP中FabrikHelperHTML::isDebug方法的典型用法代碼示例。如果您正苦於以下問題:PHP FabrikHelperHTML::isDebug方法的具體用法?PHP FabrikHelperHTML::isDebug怎麽用?PHP FabrikHelperHTML::isDebug使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在FabrikHelperHTML的用法示例。


在下文中一共展示了FabrikHelperHTML::isDebug方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: loadJavascriptClass_result

 /**
  * Get the src(s) for the list plugin js class
  *
  * @return  mixed  string or array or null. If string then is relative path to either compressed or uncompress js file.
  */
 public function loadJavascriptClass_result()
 {
     $this->onGetFilterKey();
     $p = $this->onGetFilterKey_result();
     $ext = FabrikHelperHTML::isDebug() ? '.js' : '-min.js';
     $file = 'plugins/fabrik_list/' . $p . '/' . $p . $ext;
     return JFile::exists(JPATH_SITE . '/' . $file) ? $file : null;
 }
開發者ID:ppantilla,項目名稱:bbninja,代碼行數:13,代碼來源:plugin-list.php

示例2: onAjax_download

 /**
  * Not really an AJAX call, we just use the pluginAjax method so we can run this
  * method for handling scripted downloads.
  *
  * @return  void
  */
 public function onAjax_download()
 {
     $input = $this->app->input;
     $this->setId($input->getInt('element_id'));
     $this->loadMeForAjax();
     $this->getElement();
     $params = $this->getParams();
     $url = $input->server->get('HTTP_REFERER', '', 'string');
     $this->lang->load('com_fabrik.plg.element.fabrikfileupload', JPATH_ADMINISTRATOR);
     $rowId = $input->get('rowid', '', 'string');
     $repeatCount = $input->getInt('repeatcount', 0);
     $listModel = $this->getListModel();
     $row = $listModel->getRow($rowId, false, true);
     if (!$this->canView()) {
         $this->app->enqueueMessage(FText::_('PLG_ELEMENT_FILEUPLOAD_DOWNLOAD_NO_PERMISSION'));
         $this->app->redirect($url);
         exit;
     }
     if (empty($rowId)) {
         $errMsg = FText::_('PLG_ELEMENT_FILEUPLOAD_DOWNLOAD_NO_SUCH_FILE');
         $errMsg .= FabrikHelperHTML::isDebug() ? ' (empty rowid)' : '';
         $this->app->enqueueMessage($errMsg);
         $this->app->redirect($url);
         exit;
     }
     if (empty($row)) {
         $errMsg = FText::_('PLG_ELEMENT_FILEUPLOAD_DOWNLOAD_NO_SUCH_FILE');
         $errMsg .= FabrikHelperHTML::isDebug() ? " (no such row)" : '';
         $this->app->enqueueMessage($errMsg);
         $this->app->redirect($url);
         exit;
     }
     $aclEl = $this->getFormModel()->getElement($params->get('fu_download_acl', ''), true);
     if (!empty($aclEl)) {
         $aclEl = $aclEl->getFullName();
         $aclElRaw = $aclEl . '_raw';
         $groups = $this->user->getAuthorisedViewLevels();
         $canDownload = in_array($row->{$aclElRaw}, $groups);
         if (!$canDownload) {
             $this->app->enqueueMessage(FText::_('PLG_ELEMENT_FILEUPLOAD_DOWNLOAD_NO_PERMISSION'));
             $this->app->redirect($url);
         }
     }
     $storage = $this->getStorage();
     $elName = $this->getFullName(true, false);
     $filePath = $row->{$elName};
     $filePath = FabrikWorker::JSONtoData($filePath, false);
     $filePath = is_object($filePath) ? FArrayHelper::fromObject($filePath) : (array) $filePath;
     $filePath = FArrayHelper::getValue($filePath, $repeatCount);
     $filePath = $storage->getFullPath($filePath);
     $fileContent = $storage->read($filePath);
     if ($fileContent !== false) {
         $thisFileInfo = $storage->getFileInfo($filePath);
         if ($thisFileInfo === false) {
             $errMsg = FText::_('PLG_ELEMENT_FILEUPLOAD_DOWNLOAD_NO_SUCH_FILE');
             $errMsg .= FabrikHelperHTML::isDebug(true) ? ' (path: ' . $filePath . ')' : '';
             $this->app->enqueueMessage($errMsg);
             $this->app->redirect($url);
             exit;
         }
         // Some time in the past
         header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
         header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
         header("Cache-Control: no-store, no-cache, must-revalidate");
         header("Cache-Control: post-check=0, pre-check=0", false);
         header("Pragma: no-cache");
         header('Accept-Ranges: bytes');
         header('Content-Length: ' . $thisFileInfo['filesize']);
         header('Content-Type: ' . $thisFileInfo['mime_type']);
         header('Content-Disposition: attachment; filename="' . $thisFileInfo['filename'] . '"');
         // Serve up the file
         echo $fileContent;
         // $this->downloadEmail($row, $filePath);
         $this->downloadHit($rowId, $repeatCount);
         $this->downloadLog($row, $filePath);
         // And we're done.
         exit;
     } else {
         $this->app->enqueueMessage(FText::_('PLG_ELEMENT_FILEUPLOAD_DOWNLOAD_NO_SUCH_FILE'));
         $this->app->redirect($url);
         exit;
     }
 }
開發者ID:LGBGit,項目名稱:tierno,代碼行數:89,代碼來源:fileupload.php

示例3: formJavascriptClass

 /**
  * Get the class to manage the plugin
  * to ensure that the file is loaded only once
  *
  * @since   3.1b
  *
  * @return void
  */
 public function formJavascriptClass()
 {
     $formModel = $this->getModel();
     $ext = FabrikHelperHTML::isDebug() ? '.js' : '-min.js';
     $name = $this->get('_name');
     static $jsClasses;
     if (!isset($jsClasses)) {
         $jsClasses = array();
     }
     // Load up the default script
     $script = 'plugins/fabrik_form/' . $name . '/' . $name . $ext;
     if (empty($jsClasses[$script])) {
         $formModel->formPluginShim[ucfirst($name)] = $script;
         $jsClasses[$script] = 1;
     }
 }
開發者ID:glauberm,項目名稱:cinevi,代碼行數:24,代碼來源:plugin-form.php

示例4: loadJavascriptClass_result

 /**
  * Get the src(s) for the list plugin js class
  *
  * @return  mixed   array or null. If array then key is class name and value
  * is relative path to either compressed or uncompress js file.
  */
 public function loadJavascriptClass_result()
 {
     $this->onGetFilterKey();
     $p = $this->onGetFilterKey_result();
     $ext = FabrikHelperHTML::isDebug() ? '.js' : '-min.js';
     $file = 'plugins/fabrik_list/' . $p . '/' . $p . $ext;
     if (JFile::exists(JPATH_SITE . '/' . $file)) {
         return array('FbList' . ucfirst($p) => $file);
     } else {
         return null;
     }
 }
開發者ID:glauberm,項目名稱:cinevi,代碼行數:18,代碼來源:plugin-list.php

示例5: OSRefJs

 /**
  * JS lib for OSRef
  * As different map instances may or may not load this we shouldn't put it in
  * formJavascriptClass() but call this code from elementJavascript() instead.
  * The files are still only loaded when needed and only once
  *
  * @return  void
  */
 protected function OSRefJs()
 {
     if (!isset(self::$OSRefJs)) {
         $params = $this->getParams();
         if ($params->get('fb_gm_latlng_osref')) {
             $ext = FabrikHelperHTML::isDebug() ? '.js' : '-min.js';
             FabrikHelperHTML::script('media/com_fabrik/js/lib/jscoord-1.1.1/jscoord-1.1.1' . $ext);
             self::$OSRefJs = true;
         }
     }
 }
開發者ID:jfquestiaux,項目名稱:fabrik,代碼行數:19,代碼來源:googlemap.php

示例6: formJavascriptClass

 /**
  * Get the class to manage the form element
  * to ensure that the file is loaded only once
  *
  * @param   array  &$srcs  Scripts previously loaded
  * @param   string $script Script to load once class has loaded
  * @param   array  &$shim  Dependant class names to load before loading the class - put in requirejs.config shim
  *
  * @return void
  */
 public function formJavascriptClass(&$srcs, $script = '', &$shim = array())
 {
     $key = FabrikHelperHTML::isDebug() ? 'element/date/date' : 'element/date/date-min';
     // Ensure that we keep advanced dependencies from previous date elements regardless of current elements settings.
     $deps = array_key_exists($key, $shim) ? $shim[$key]->deps : array();
     $params = $this->getParams();
     if ($params->get('date_advanced', '0') == '1' && !in_array('lib/datejs/date', $deps)) {
         $deps[] = 'lib/datejs/globalization/' . JFactory::getLanguage()->getTag();
         $deps[] = 'lib/datejs/core';
         $deps[] = 'lib/datejs/parser';
         $deps[] = 'lib/datejs/extras';
     }
     if (count($deps) > 0) {
         $s = new stdClass();
         $s->deps = $deps;
         $shim[$key] = $s;
     }
     parent::formJavascriptClass($srcs, $script, $shim);
     // Return false, as we need to be called on per-element (not per-plugin) basis
     return false;
 }
開發者ID:glauberm,項目名稱:cinevi,代碼行數:31,代碼來源:date.php

示例7: loadJavascriptClass

 /**
  * Load the javascript class that manages plugin interaction
  * should only be called once
  *
  * @return  string  Javascript class file
  */
 public function loadJavascriptClass()
 {
     $params = $this->getParams();
     $opts = array();
     $opts['container'] = 'radius_search_place_container';
     // Increase z-index with advanced class
     $opts['menuclass'] = 'auto-complete-container advanced';
     if ($params->get('myloc', 1) == 1) {
         $ext = FabrikHelperHTML::isDebug() ? '.js' : '-min.js';
         FabrikHelperHTML::script('media/com_fabrik/js/lib/geo-location/geo' . $ext);
     }
     parent::loadJavascriptClass();
 }
開發者ID:jfquestiaux,項目名稱:fabrik,代碼行數:19,代碼來源:radius_lookup.php

示例8: getAllowedPHPDates

 /**
  * Get the allowed dates based on evaluated PHP code
  *
  * @return multitype:|array
  */
 protected function getAllowedPHPDates()
 {
     $params = $this->getParams();
     $data = $this->getFormModel()->data;
     $php = $params->get('date_allow_php_func', '');
     $dates = array();
     if ($php === '') {
         return $dates;
     }
     $dates = FabrikHelperHTML::isDebug() ? eval($php) : @eval($php);
     FabrikWorker::logEval($dates, 'Eval exception : ' . $this->getElement()->name . '::getAllowedPHPDates() : %s');
     return (array) $dates;
 }
開發者ID:LGBGit,項目名稱:tierno,代碼行數:18,代碼來源:date.php

示例9: display

 /**
  * Execute and display a template script.
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  mixed  A string if successful, otherwise a JError object.
  */
 public function display($tpl = 'default')
 {
     $srcs = FabrikHelperHTML::framework();
     FabrikHelperHTML::slimbox();
     $document = JFactory::getDocument();
     $usersConfig = JComponentHelper::getParams('com_fabrik');
     $model = $this->getModel();
     $model->setId(JRequest::getVar('id', $usersConfig->get('visualizationid', JRequest::getInt('visualizationid', 0))));
     $this->row = $model->getVisualization();
     $js = $model->getJs();
     $this->txt = $model->getText();
     $params = $model->getParams();
     $this->assign('params', $params);
     $tpl = $params->get('fb_gm_layout', $tpl);
     $tmplpath = JPATH_ROOT . '/plugins/fabrik_visualization/googlemap/views/googlemap/tmpl/' . $tpl;
     $srcs[] = 'media/com_fabrik/js/listfilter.js';
     $uri = JURI::getInstance();
     if ($params->get('fb_gm_center') == 'userslocation') {
         $document->addScript($uri->getScheme() . '://code.google.com/apis/gears/gears_init.js');
         $srcs[] = 'components/com_fabrik/libs/geo-location/geo.js';
     }
     $model->getPluginJsClasses($srcs);
     global $ispda;
     if ($ispda == 1) {
         // Pdabot
         $template = 'static';
         $this->assign('staticmap', $this->get('StaticMap'));
     } else {
         $src = $uri->getScheme() . '://maps.google.com/maps/api/js?sensor=' . $params->get('fb_gm_sensor', 'false');
         $document->addScript($src);
         if (FabrikHelperHTML::isDebug()) {
             $srcs[] = 'plugins/fabrik_visualization/googlemap/googlemap.js';
         } else {
             $srcs[] = 'plugins/fabrik_visualization/googlemap/googlemap-min.js';
         }
         if ((int) $this->params->get('fb_gm_clustering', '0') == 1) {
             if (FabrikHelperHTML::isDebug()) {
                 $srcs[] = 'components/com_fabrik/libs/googlemaps/markerclustererplus/src/markerclusterer.js';
             } else {
                 $srcs[] = 'components/com_fabrik/libs/googlemaps/markerclustererplus/src/markerclusterer_packed.js';
             }
         } else {
             // Doesn't work in v3
             // FabrikHelperHTML::script('components/com_fabrik/libs/googlemaps/markermanager.js');
         }
         FabrikHelperHTML::addScriptDeclaration($js);
         $template = null;
     }
     $js = $this->get('PluginJsObjects');
     $js .= $model->getFilterJs();
     FabrikHelperHTML::script($srcs, $js);
     FabrikHelperHTML::stylesheetFromPath('plugins/fabrik_visualization/googlemap/views/googlemap/tmpl/' . $tpl . '/template.css');
     // Check and add a general fabrik custom css file overrides template css and generic table css
     FabrikHelperHTML::stylesheetFromPath('media/com_fabrik/css/custom.css');
     // Check and add a specific viz template css file overrides template css generic table css and generic custom css
     FabrikHelperHTML::stylesheetFromPath('plugins/fabrik_visualization/googlemap/views/googlemap/tmpl/' . $tpl . '/custom.css');
     $this->assignRef('filters', $this->get('Filters'));
     $this->assign('showFilters', JRequest::getInt('showfilters', $params->get('show_filters')) === 1 ? 1 : 0);
     $this->assign('filterFormURL', $this->get('FilterFormURL'));
     $this->assign('sidebarPosition', $params->get('fb_gm_use_overlays_sidebar'));
     if ($this->get('ShowSideBar')) {
         $this->assign('showSidebar', 1);
         $this->assign('overlayUrls', (array) $params->get('fb_gm_overlay_urls'));
         $this->assign('overlayLabels', (array) $params->get('fb_gm_overlay_labels'));
     } else {
         $this->assign('showSidebar', 0);
     }
     $this->_setPath('template', $tmplpath);
     $this->assign('containerId', $this->get('ContainerId'));
     $this->assignRef('groupTemplates', $this->get('GroupTemplates'));
     echo parent::display($template);
 }
開發者ID:rogeriocc,項目名稱:fabrik,代碼行數:79,代碼來源:view.html.php

示例10: defined

/**
 * Bootstrap Tabs Form Template
 *
 * @package     Joomla
 * @subpackage  Fabrik
 * @copyright   Copyright (C) 2005-2015 fabrikar.com - All rights reserved.
 * @license     GNU/GPL http://www.gnu.org/copyleft/gpl.html
 * @since       3.1
 */
// No direct access
defined('_JEXEC') or die('Restricted access');
$form = $this->form;
$model = $this->getModel();
$groupTmpl = $model->editable ? 'group' : 'group_details';
$active = $form->error != '' ? '' : ' fabrikHide';
if ($model->isMultiPage() && FabrikHelperHTML::isDebug()) {
    $app = JFactory::getApplication();
    $app->enqueueMessage(FText::_('COM_FABRIK_ERR_TAB_FORM_TEMPLATE_INCOMPATIBLE_WITH_MULTIPAGE_FORMS'), 'error');
}
if ($this->params->get('show_page_heading', 1)) {
    ?>
	<div class="componentheading<?php 
    echo $this->params->get('pageclass_sfx');
    ?>
">
	<?php 
    echo $this->escape($this->params->get('page_heading'));
    ?>
	</div>
<?php 
}
開發者ID:LGBGit,項目名稱:tierno,代碼行數:31,代碼來源:default.php

示例11: formJavascriptClass

 /**
  * Get the class to manage the form element
  * to ensure that the file is loaded only once
  *
  * @param   array  &$srcs  Scripts previously loaded
  * @param   string $script Script to load once class has loaded
  * @param   array  &$shim  Dependant class names to load before loading the class - put in requirejs.config shim
  *
  * @return void
  */
 public function formJavascriptClass(&$srcs, $script = '', &$shim = array())
 {
     $key = FabrikHelperHTML::isDebug() ? 'element/digsig/digsig' : 'element/digsig/digsig-min';
     $s = new stdClass();
     $s->deps = array();
     $folder = 'element/digsig/libs/signature-pad/';
     $digsigShim = new stdClass();
     $digsigShim->deps = array($folder . 'jquery.signaturepad');
     $s->deps[] = $folder . 'jquery.signaturepad';
     $s->deps[] = $folder . 'flashcanvas';
     $shim[$folder . 'flashcanvas'] = $digsigShim;
     $s->deps[] = $folder . 'json2';
     $shim[$folder . 'json2'] = $digsigShim;
     $shim[$key] = $s;
     FabrikHelperHTML::stylesheet(COM_FABRIK_LIVESITE . 'plugins/fabrik_element/digsig/libs/signature-pad/jquery.signaturepad.css');
     parent::formJavascriptClass($srcs, $script, $shim);
     // $$$ hugh - added this, and some logic in the view, so we will get called on a per-element basis
     return false;
 }
開發者ID:jfquestiaux,項目名稱:fabrik,代碼行數:29,代碼來源:digsig.php

示例12: onAjax_calc

 /**
  * Perform calculation from ajax request
  *
  * @return  void
  */
 public function onAjax_calc()
 {
     $input = $this->app->input;
     $this->setId($input->getInt('element_id'));
     $this->loadMeForAjax();
     $params = $this->getParams();
     $w = new FabrikWorker();
     $filter = JFilterInput::getInstance();
     $d = $filter->clean($_REQUEST, 'array');
     $formModel = $this->getFormModel();
     $formModel->addEncrytedVarsToArray($d);
     $this->getFormModel()->data = $d;
     $this->swapValuesForLabels($d);
     $calc = $params->get('calc_calculation');
     $this->setStoreDatabaseFormat($d);
     // $$$ hugh - trying to standardize on $data so scripts know where data is
     $data = $d;
     $calc = $w->parseMessageForPlaceHolder($calc, $d);
     $c = FabrikHelperHTML::isDebug() ? eval($calc) : @eval($calc);
     $c = preg_replace('#(\\/\\*.*?\\*\\/)#', '', $c);
     echo $c;
 }
開發者ID:jfquestiaux,項目名稱:fabrik,代碼行數:27,代碼來源:calc.php

示例13: formJavascriptClass

 /**
  * Get the class to manage the form element
  * to ensure that the file is loaded only once
  *
  * @param   array   &$srcs   Scripts previously loaded
  * @param   string  $script  Script to load once class has loaded
  * @param   array   &$shim   Dependant class names to load before loading the class - put in requirejs.config shim
  *
  * @return void|boolean
  */
 public function formJavascriptClass(&$srcs, $script = '', &$shim = array())
 {
     $key = FabrikHelperHTML::isDebug() ? 'element/tags/tags' : 'element/tags/tags-min';
     $s = new stdClass();
     // Even though fab/element is now an AMD defined module we should still keep it in here
     // otherwise (not sure of the reason) jQuery.mask is not defined in field.js
     // Seems OK now - reverting to empty array
     $s->deps = array();
     $folder = 'media/jui/js/';
     $s->deps[] = $folder . 'ajax-chosen';
     if (array_key_exists($key, $shim)) {
         $shim[$key]->deps = array_merge($shim[$key]->deps, $s->deps);
     } else {
         $shim[$key] = $s;
     }
     parent::formJavascriptClass($srcs, $script, $shim);
     // $$$ hugh - added this, and some logic in the view, so we will get called on a per-element basis
     return false;
 }
開發者ID:jfquestiaux,項目名稱:fabrik,代碼行數:29,代碼來源:tags.php

示例14: geoJs

 /**
  * As different map instances may or may not load geo.js we shouldn't put it in
  * formJavascriptClass() but call this code from elementJavascript() instead.
  * The files are still only loaded when needed and only once
  *
  * @return  void
  */
 protected function geoJs()
 {
     if (!isset(self::$geoJs)) {
         $params = $this->getParams();
         if ($params->get('fb_gm_defaultloc')) {
             $ext = FabrikHelperHTML::isDebug() ? '.js' : '-min.js';
             FabrikHelperHTML::script('media/com_fabrik/js/lib/geo-location/geo' . $ext);
             self::$geoJs = true;
         }
     }
 }
開發者ID:LGBGit,項目名稱:tierno,代碼行數:18,代碼來源:googlemap.php

示例15: loadJavascriptClass

 /**
  * Load the javascript class that manages plugin interaction
  * should only be called once
  *
  * @return  string  Javascript class file
  */
 public function loadJavascriptClass()
 {
     $params = $this->getParams();
     $model = $this->getModel();
     $mapElement = $this->getMapElement();
     if (!is_object($mapElement)) {
         throw new RuntimeException('Radius search plug-in active but map element unpublished');
         return;
     }
     $opts = array();
     $opts['container'] = 'radius_search_place_container';
     // Increase z-index with advanced class
     $opts['menuclass'] = 'auto-complete-container advanced';
     $formId = $model->getFormModel()->get('id');
     if ($params->get('place', 1) == 1) {
         $el = $this->getPlaceElement();
         FabrikHelperHTML::autoComplete("radius_search_place{$this->renderOrder}", $el->getElement()->id, $formId, $el->getElement()->plugin, $opts);
     }
     if ($params->get('myloc', 1) == 1) {
         $ext = FabrikHelperHTML::isDebug() ? '.js' : '-min.js';
         FabrikHelperHTML::script('media/com_fabrik/js/lib/geo-location/geo' . $ext);
     }
     parent::loadJavascriptClass();
 }
開發者ID:jfquestiaux,項目名稱:fabrik,代碼行數:30,代碼來源:radius_search.php


注:本文中的FabrikHelperHTML::isDebug方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。