本文整理匯總了PHP中EE_Fieldtype::EE_Fieldtype方法的典型用法代碼示例。如果您正苦於以下問題:PHP EE_Fieldtype::EE_Fieldtype方法的具體用法?PHP EE_Fieldtype::EE_Fieldtype怎麽用?PHP EE_Fieldtype::EE_Fieldtype使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類EE_Fieldtype
的用法示例。
在下文中一共展示了EE_Fieldtype::EE_Fieldtype方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
/**
* Constructor
*
* @access public
*/
function Structure_ft()
{
parent::EE_Fieldtype();
$this->sql = new Sql_structure();
$this->site_pages = $this->sql->get_site_pages();
$this->site_id = $this->EE->config->item('site_id');
}
示例2: define
function Mx_google_map_ft()
{
parent::EE_Fieldtype();
if (defined('SITE_ID') == FALSE) {
define('SITE_ID', $this->EE->config->item('site_id'));
}
}
示例3:
function Google_maps_ft()
{
if (version_compare(APP_VER, '2.1.4', '>')) {
parent::__construct();
} else {
parent::EE_Fieldtype();
}
}
示例4:
function Dk_server_file_select_ft()
{
if (version_compare(APP_VER, '2.1.4', '>')) {
parent::__construct();
} else {
parent::EE_Fieldtype();
}
}
示例5: __construct
/**
* Constructor
*
* @access public
*/
public function __construct()
{
parent::EE_Fieldtype();
$this->addon_id = strtolower(substr(__CLASS__, 0, -3));
if (!isset($this->EE->session->cache[$this->addon_id])) {
$this->EE->session->cache[$this->addon_id]["members"] = array();
}
}
示例6: __construct
/**
* Constructor function.
*
* @access public
* @return void
*/
public function __construct()
{
parent::EE_Fieldtype();
$this->_class = get_class($this);
$this->_lower_class = strtolower($this->_class);
$this->_time_format = $this->EE->config->item('time_format');
$this->postpone_saves = TRUE;
$this->default_settings = array('date_format' => self::DROPDATE_FMT_UNIX, 'year_range' => '1900-2020', 'show_time' => '');
}
示例7: array
/**
* Fieldtype Constructor
*/
function Pt_switch_ft()
{
parent::EE_Fieldtype();
/** ----------------------------------------
/** Prepare Cache
/** ----------------------------------------*/
if (!isset($this->EE->session->cache['pt_switch'])) {
$this->EE->session->cache['pt_switch'] = array('includes' => array());
}
$this->cache =& $this->EE->session->cache['pt_switch'];
}
示例8: array
/**
* Fieldtype Constructor
*/
function Wygwam_ft()
{
parent::EE_Fieldtype();
$this->helper = new Wygwam_Helper();
// -------------------------------------------
// Prepare Cache
// -------------------------------------------
if (!isset($this->EE->session->cache['wygwam'])) {
$this->EE->session->cache['wygwam'] = array();
}
$this->cache =& $this->EE->session->cache['wygwam'];
}
示例9: __construct
/**
* Constructor
*
* @access public
*
* Calls the parent constructor
*/
public function __construct()
{
if (version_compare(APP_VER, '2.1.4', '>')) {
parent::__construct();
} else {
parent::EE_Fieldtype();
}
$this->prefix = INSTRUCTION_FIELD_MAP . '_';
//load lang file
ee()->lang->loadfile(INSTRUCTION_FIELD_MAP);
//require settings
require 'settings.php';
}
示例10: __construct
/**
* Constructor
*
* @access public
*/
public function __construct()
{
//is_callable doesn't do is right here, so we need
//to use method exists to get a true bearing on it
if (method_exists('EE_Fieldtype', '__construct')) {
parent::__construct();
} else {
parent::EE_Fieldtype();
}
$this->EE =& get_instance();
$this->field_id = isset($this->settings['field_id']) ? $this->settings['field_id'] : $this->field_id;
$this->field_name = isset($this->settings['field_name']) ? $this->settings['field_name'] : $this->field_name;
}
示例11: __construct
/**
* PHP5 Constructor
*
* @return void
*/
public function __construct()
{
parent::EE_Fieldtype();
// -------------------------------------
// Package path
// -------------------------------------
$this->EE->load->add_package_path(PATH_THIRD . $this->package);
// -------------------------------------
// Load helper
// -------------------------------------
$this->EE->load->helper($this->package);
$this->EE->lang->loadfile($this->package);
}
示例12: array
/**
* Fieldtype Constructor
*/
function __construct()
{
parent::EE_Fieldtype();
// -------------------------------------------
// Prepare Cache
// -------------------------------------------
if (! isset($this->EE->session->cache['matrix']))
{
$this->EE->session->cache['matrix'] = array('celltypes' => array());
}
$this->cache =& $this->EE->session->cache['matrix'];
}
示例13: array
/**
* Fieldtype Constructor
*/
function __construct()
{
parent::EE_Fieldtype();
// -------------------------------------------
// Prepare Cache
// -------------------------------------------
if (! isset($this->EE->session->cache['playa']))
{
$this->EE->session->cache['playa'] = array();
}
$this->cache =& $this->EE->session->cache['playa'];
// -------------------------------------------
// Load the helper
// -------------------------------------------
if (! class_exists('Playa_Helper'))
{
require_once PATH_THIRD.'playa/helper.php';
}
$this->helper = new Playa_Helper();
// -------------------------------------------
// Need to call update()?
// -------------------------------------------
if (! $this->EE->db->table_exists('playa_relationships'))
{
// was Playa 3 installed?
$query = $this->EE->db->select('fieldtype_id, version')
->where('name', 'playa')
->get('fieldtypes');
if ($query->num_rows())
{
// call update()
$this->update($query->row('version'));
// update the version # in exp_fieldtypes
$this->EE->db->where('fieldtype_id', $query->row('fieldtype_id'))
->update('fieldtypes', array('version' => PLAYA_VER));
}
}
}
示例14:
/**
* Constructor
*
* @access public
*/
function Zoo_visitor_ft()
{
if (version_compare(APP_VER, '2.6.0', '<')) {
parent::EE_Fieldtype();
} else {
EE_Fieldtype::__construct();
}
$this->EE->load->add_package_path(PATH_THIRD . 'zoo_visitor/');
$this->EE->load->library('zoo_visitor_lib');
$this->EE->load->helper('zoo_visitor');
$this->EE->lang->loadfile('zoo_visitor');
$this->zoo_settings = get_zoo_settings($this->EE);
if (REQ == 'CP') {
$this->EE->cp->add_to_head('<link rel="stylesheet" href="' . _theme_url($this->EE) . 'css/zoo_visitor.css" type="text/css" media="screen" /> ');
}
}
示例15: __construct
/**
* Constructor
*
* @access public
*
* Calls the parent constructor
*/
public function __construct()
{
if (version_compare(APP_VER, '2.1.4', '>')) {
parent::__construct();
} else {
parent::EE_Fieldtype();
}
if ($this->EE->input->cookie('cp_last_site_id')) {
$this->site_id = $this->EE->input->cookie('cp_last_site_id');
} else {
if ($this->EE->input->get_post('site_id')) {
$this->site_id = $this->EE->input->get_post('site_id');
} else {
$this->site_id = $this->EE->config->item('site_id');
}
}
$this->EE->load->add_package_path(PATH_THIRD . 'editor/');
$this->EE->lang->loadfile('editor');
$this->EE->load->library('editor_helper');
$this->EE->config->load('editor_config');
$this->cache = array();
}