本文整理汇总了PHP中JFormField::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP JFormField::__construct方法的具体用法?PHP JFormField::__construct怎么用?PHP JFormField::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JFormField
的用法示例。
在下文中一共展示了JFormField::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct(JForm $form = null)
{
parent::__construct($form);
static $resources = true;
if ($resources) {
$resources = false;
$name = basename(realpath(dirname(__FILE__) . "/../.."));
$document = JFactory::getDocument();
// $this->element is not ready on the constructor
//$type = (string)$this->element["type"];
$type = strtolower($this->type);
if (file_exists(JPATH_ADMINISTRATOR . "/components/" . $name . "/js/" . $type . ".js")) {
$document->addScript(JUri::current() . "?option=" . $name . "&view=loader&filename=" . $type . "&type=js");
}
if (file_exists(JPATH_ADMINISTRATOR . "/components/" . $name . "/css/" . $type . ".css")) {
$document->addStyleSheet(JUri::base(true) . "/components/" . $name . "/css/" . $type . ".css");
}
$scope = JFactory::getApplication()->scope;
if (file_exists(JPATH_ADMINISTRATOR . "/components/" . $name . "/js/" . $scope . ".js")) {
$document->addScript(JUri::current() . "?option=" . $name . "&view=loader&filename=" . $scope . "&type=js");
}
if (file_exists(JPATH_ADMINISTRATOR . "/components/" . $name . "/css/" . $scope . ".css")) {
$document->addStyleSheet(JUri::base(true) . "/components/" . $name . "/css/" . $scope . ".css");
}
}
}
示例2: JVersion
function __construct($form = null)
{
parent::__construct($form);
if (!isset($GLOBALS[$this->type . '_initialized'])) {
$GLOBALS[$this->type . '_initialized'] = true;
$url_to_assets = JURI::root() . 'libraries/gjfields/';
$path_to_assets = JPATH_ROOT . '/libraries/gjfields/';
$doc = JFactory::getDocument();
$cssname = $url_to_assets . 'css/common.css';
$cssname_path = $path_to_assets . 'css/common.css';
if (file_exists($cssname_path)) {
$doc->addStyleSheet($cssname);
}
$this->type = JString::strtolower($this->type);
$cssname = $url_to_assets . 'css/' . $this->type . '.css';
$cssname_path = $path_to_assets . 'css/' . $this->type . '.css';
if (file_exists($cssname_path)) {
$doc->addStyleSheet($cssname);
}
$jversion = new JVersion();
$common_script = $url_to_assets . 'js/script.js?v=' . $jversion->RELEASE;
$doc->addScript($common_script);
$scriptname = $url_to_assets . 'js/' . $this->type . '.js';
$scriptname_path = $path_to_assets . 'js/' . $this->type . '.js';
if (file_exists($scriptname_path)) {
$doc->addScript($scriptname);
}
}
}
示例3: stdClass
function __construct()
{
$plugin = JPluginHelper::getPlugin('system', 'minicck');
$this->pluginParams = !empty($plugin->params) ? json_decode($plugin->params) : new stdClass();
$this->fields = !empty($this->pluginParams->customfields) ? $this->pluginParams->customfields : array();
parent::__construct();
}
示例4: __construct
/**
* Override by loading Profile Picture parameters.
*
* @param JForm $form The form to attach to the form field object.
*
* @since 2.0
*/
public function __construct($form = null)
{
$plugin = JPluginHelper::getPlugin('user', 'profilepicture');
$this->params = new JRegistry($plugin->params);
$this->maxUploadSizeInBytes = $this->params->get('maxUploadSizeInBytes', 800000);
parent::__construct($form);
}
示例5: __construct
public function __construct()
{
parent::__construct();
//Get configuration
$app = JFactory::getApplication();
$config = JFactory::getConfig();
}
示例6: __construct
public function __construct($form = null)
{
parent::__construct($form);
$config = JFactory::getConfig();
if (!$config->get('caching', 0)) {
JFactory::getApplication()->enqueueMessage(JText::_('ROKBOOSTER_CACHE_NOT_ENABLED_WARNING'), 'notice');
}
}
示例7: __construct
public function __construct($form = null)
{
parent::__construct($form);
$this->file = \Triiuark\D::getEnableFile();
if (is_file($this->file)) {
$this->isEnabled = true;
}
}
示例8: array
function __construct($form = null)
{
// Must load admin language files
$lang =& JFactory::getLanguage();
$lang->load("com_jevents", JPATH_ADMINISTRATOR);
parent::__construct($form);
$this->data = array();
$this->labeldata = array();
}
示例9: __construct
public function __construct($form = null)
{
parent::__construct($form);
if (!isset($GLOBALS["ozio_textimproved_fields_loaded"])) {
JFactory::getDocument()->addStyleSheet(JUri::base(true) . "/components/com_oziogallery3/models/fields/fields.css");
JFactory::getDocument()->addScript(JUri::base(true) . "/components/com_oziogallery3/js/get_id.js");
$GLOBALS["ozio_textimproved_fields_loaded"] = true;
}
}
示例10: __construct
public function __construct($form = null)
{
if (!defined('ROKUPDATER_ROOT_PATH')) {
define('ROKUPDATER_ROOT_PATH', JPATH_PLUGINS . '/system/rokupdater/');
}
require_once ROKUPDATER_ROOT_PATH . '/lib/include.php';
$this->container = RokUpdater_ServiceProvider::getInstance();
parent::__construct($form);
}
示例11: __construct
public function __construct($parent = null)
{
$include_file = realpath(JPATH_SITE . '/components/com_rokgallery/include.php');
$included_files = get_included_files();
if (!in_array($include_file, $included_files) && ($libret = (require_once $include_file)) !== 'JOOMLA_ROKGALLERY_LIB_INCLUDED') {
JError::raiseWarning(100, 'RokGallery: ' . implode('<br /> - ', $loaderrors));
return;
}
parent::__construct($parent);
}
示例12: __construct
public function __construct($form = null)
{
parent::__construct($form);
if (!isset(self::$ob_enabled)) {
self::$ob_enabled = (bool) ini_get('output_buffering');
if (self::$ob_enabled) {
JFactory::getApplication()->enqueueMessage(JText::_('ROKBOOSTER_BACKGROUND_PROCESSING_NOT_AVAILABLE'), 'notice');
}
}
}
示例13: __construct
public function __construct()
{
parent::__construct();
$this->setTemplates();
if (defined('ZYGOCONTENT_ADDED')) {
return;
}
define('ZYGOCONTENT_ADDED', true);
$this->addJS();
}
示例14: __construct
public function __construct($parent = null)
{
if (!defined('ROKGALLERYMODULE')) {
define('ROKGALLERYMODULE', 'ROKGALLERYMODULE');
}
// Set base dirs
self::$ROKGALLERYMODULE_ROOT = JPATH_ROOT . '/modules/mod_rokgallery';
//load up the RTCommon
require_once self::$ROKGALLERYMODULE_ROOT . '/lib/include.php';
parent::__construct($parent);
}
示例15: __construct
public function __construct($parent = null)
{
if (!defined('ROKMINIEVENTS')) {
define('ROKMINIEVENTS', 'ROKMINIEVENTS');
}
// Set base dirs
self::$ROKMINIEVENTS_ROOT = JPATH_ROOT . '/modules/mod_rokminievents';
self::$SOURCE_DIR = self::$ROKMINIEVENTS_ROOT . '/lib/RokMiniEvents/Source';
//load up the RTCommon
require_once self::$ROKMINIEVENTS_ROOT . '/lib/include.php';
parent::__construct($parent);
}