本文整理汇总了PHP中nnFrameworkFunctions::extensionInstalled方法的典型用法代码示例。如果您正苦于以下问题:PHP nnFrameworkFunctions::extensionInstalled方法的具体用法?PHP nnFrameworkFunctions::extensionInstalled怎么用?PHP nnFrameworkFunctions::extensionInstalled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nnFrameworkFunctions
的用法示例。
在下文中一共展示了nnFrameworkFunctions::extensionInstalled方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getInput
protected function getInput()
{
if (!nnFrameworkFunctions::extensionInstalled('flexicontent'))
{
return '<fieldset class="radio"><label class="nn_label nn_label_error">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_FILES_NOT_FOUND', JText::_('NN_FLEXICONTENT')) . '</label></fieldset>';
}
$this->params = $this->element->attributes();
$this->db = JFactory::getDBO();
$group = $this->get('group', 'categories');
$tables = $this->db->getTableList();
if (!in_array($this->db->getPrefix() . 'flexicontent_' . $group, $tables))
{
return '<fieldset class="radio"><label class="nn_label nn_label_error">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_TABLE_NOT_FOUND', JText::_('NN_FLEXICONTENT')) . '</label></fieldset>';
}
if (!is_array($this->value))
{
$this->value = explode(',', $this->value);
}
$options = $this->{'get' . $group}();
$size = (int) $this->get('size');
$multiple = $this->get('multiple');
require_once JPATH_PLUGINS . '/system/nnframework/helpers/html.php';
return nnHtml::selectlist($options, $this->name, $this->value, $this->id, $size, $multiple);
}
示例2: getInput
protected function getInput()
{
if (!nnFrameworkFunctions::extensionInstalled('akeebasubs')) {
return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_FILES_NOT_FOUND', JText::_('NN_AKEEBASUBS')) . '</fieldset>';
}
$this->params = $this->element->attributes();
$this->db = JFactory::getDBO();
$group = $this->get('group', 'categories');
$tables = $this->db->getTableList();
if (!in_array($this->db->getPrefix() . 'akeebasubs_' . $group, $tables)) {
return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_TABLE_NOT_FOUND', JText::_('NN_AKEEBASUBS')) . '</fieldset>';
}
if (!is_array($this->value)) {
$this->value = explode(',', $this->value);
}
$options = $this->{'get' . $group}();
$size = (int) $this->get('size');
$multiple = $this->get('multiple');
require_once JPATH_PLUGINS . '/system/nnframework/helpers/html.php';
switch ($group) {
case 'categories':
return nnHtml::selectlist($options, $this->name, $this->value, $this->id, $size, $multiple);
default:
return nnHtml::selectlistsimple($options, $this->name, $this->value, $this->id, $size, $multiple);
}
}
示例3: getInput
protected function getInput()
{
if (!nnFrameworkFunctions::extensionInstalled('mijoshop')) {
return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_FILES_NOT_FOUND', JText::_('NN_MIJOSHOP')) . '</fieldset>';
}
$this->params = $this->element->attributes();
$this->db = JFactory::getDBO();
$group = $this->get('group', 'categories');
$tables = $this->db->getTableList();
if (!in_array($this->db->getPrefix() . 'mijoshop_' . ($group == 'products' ? 'product' : 'category'), $tables)) {
return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_TABLE_NOT_FOUND', JText::_('NN_MIJOSHOP')) . '</fieldset>';
}
$parameters = nnParameters::getInstance();
$params = $parameters->getPluginParams('nnframework');
$this->max_list_count = $params->max_list_count;
if (!class_exists('MijoShop')) {
require_once JPATH_ROOT . '/components/com_mijoshop/mijoshop/mijoshop.php';
}
$this->store_id = (int) MijoShop::get('opencart')->get('config')->get('config_store_id');
$this->language_id = (int) MijoShop::get('opencart')->get('config')->get('config_language_id');
if (!is_array($this->value)) {
$this->value = explode(',', $this->value);
}
$options = $this->{'get' . $group}();
$size = (int) $this->get('size');
$multiple = $this->get('multiple');
require_once JPATH_PLUGINS . '/system/nnframework/helpers/html.php';
switch ($group) {
case 'categories':
return nnHtml::selectlist($options, $this->name, $this->value, $this->id, $size, $multiple);
default:
return nnHtml::selectlistsimple($options, $this->name, $this->value, $this->id, $size, $multiple);
}
}
示例4: getInput
protected function getInput()
{
if (!nnFrameworkFunctions::extensionInstalled('virtuemart')) {
return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_FILES_NOT_FOUND', JText::_('NN_VIRTUEMART')) . '</fieldset>';
}
$this->params = $this->element->attributes();
$this->db = JFactory::getDBO();
$group = $this->get('group', 'categories');
$tables = $this->db->getTableList();
if (!in_array($this->db->getPrefix() . 'virtuemart_' . $group, $tables)) {
return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_TABLE_NOT_FOUND', JText::_('NN_VIRTUEMART')) . '</fieldset>';
}
$parameters = nnParameters::getInstance();
$params = $parameters->getPluginParams('nnframework');
$this->max_list_count = $params->max_list_count;
if (!is_array($this->value)) {
$this->value = explode(',', $this->value);
}
$options = $this->{'get' . $group}();
$size = (int) $this->get('size');
$multiple = $this->get('multiple');
if ($group == 'categories') {
require_once JPATH_PLUGINS . '/system/nnframework/helpers/html.php';
return nnHtml::selectlist($options, $this->name, $this->value, $this->id, $size, $multiple);
}
$size = $size ? 'style="width:' . $size . 'px"' : '';
$attr = $size;
$attr .= $multiple ? ' multiple="multiple"' : '';
return JHtml::_('select.genericlist', $options, $this->name, trim($attr), 'value', 'text', $this->value, $this->id);
}
示例5: missingFilesOrTables
public function missingFilesOrTables($tables = array('categories', 'items'), $component = '', $table_prefix = '')
{
$component = $component ?: $this->type;
if (!nnFrameworkFunctions::extensionInstalled(strtolower($component))) {
return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_FILES_NOT_FOUND', JText::_('NN_' . strtoupper($component))) . '</fieldset>';
}
$group = $this->getGroup();
if (!in_array($group, $tables) && !in_array($group, array_keys($tables))) {
// no need to check database table for this group
return false;
}
$table_list = $this->db->getTableList();
$table = isset($tables[$group]) ? $tables[$group] : $group;
$table = $this->db->getPrefix() . strtolower($table_prefix ?: $component) . '_' . $table;
if (in_array($table, $table_list)) {
// database table exists, so no error
return false;
}
return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_TABLE_NOT_FOUND', JText::_('NN_' . strtoupper($component))) . '</fieldset>';
}
示例6: __construct
public function __construct()
{
$this->db = JFactory::getDBO();
$this->has = array();
$this->has['easyblog'] = nnFrameworkFunctions::extensionInstalled('easyblog');
$this->has['flexicontent'] = nnFrameworkFunctions::extensionInstalled('flexicontent');
$this->has['form2content'] = nnFrameworkFunctions::extensionInstalled('form2content');
$this->has['k2'] = nnFrameworkFunctions::extensionInstalled('k2');
$this->has['zoo'] = nnFrameworkFunctions::extensionInstalled('zoo');
$this->has['akeebasubs'] = nnFrameworkFunctions::extensionInstalled('akeebasubs');
$this->has['hikashop'] = nnFrameworkFunctions::extensionInstalled('hikashop');
$this->has['mijoshop'] = nnFrameworkFunctions::extensionInstalled('mijoshop');
$this->has['redshop'] = nnFrameworkFunctions::extensionInstalled('redshop');
$this->has['virtuemart'] = nnFrameworkFunctions::extensionInstalled('virtuemart');
$this->has['cookieconfirm'] = nnFrameworkFunctions::extensionInstalled('cookieconfirm');
$this->types = array('menuitems' => 'Menu', 'homepage' => 'HomePage', 'date' => 'DateTime.Date', 'seasons' => 'DateTime.Seasons', 'months' => 'DateTime.Months', 'days' => 'DateTime.Days', 'time' => 'DateTime.Time', 'usergrouplevels' => 'Users.UserGroupLevels', 'users' => 'Users.Users', 'languages' => 'Languages', 'ips' => 'IPs', 'geocontinents' => 'Geo.Continents', 'geocountries' => 'Geo.Countries', 'georegions' => 'Geo.Regions', 'templates' => 'Templates', 'urls' => 'URLs', 'os' => 'Agents.OS', 'browsers' => 'Agents.Browsers', 'components' => 'Components', 'tags' => 'Tags', 'contentpagetypes' => 'Content.PageTypes', 'cats' => 'Content.Categories', 'articles' => 'Content.Articles', 'easyblogpagetypes' => 'EasyBlog.PageTypes', 'easyblogcats' => 'EasyBlog.Categories', 'easyblogtags' => 'EasyBlog.Tags', 'easyblogitems' => 'EasyBlog.Items', 'flexicontentpagetypes' => 'FlexiContent.PageTypes', 'flexicontenttags' => 'FlexiContent.Tags', 'flexicontenttypes' => 'FlexiContent.Types', 'form2contentprojects' => 'Form2Content.Projects', 'k2pagetypes' => 'K2.PageTypes', 'k2cats' => 'K2.Categories', 'k2tags' => 'K2.Tags', 'k2items' => 'K2.Items', 'zoopagetypes' => 'Zoo.PageTypes', 'zoocats' => 'Zoo.Categories', 'zooitems' => 'Zoo.Items', 'akeebasubspagetypes' => 'AkeebaSubs.PageTypes', 'akeebasubslevels' => 'AkeebaSubs.Levels', 'hikashoppagetypes' => 'HikaShop.PageTypes', 'hikashopcats' => 'HikaShop.Categories', 'hikashopproducts' => 'HikaShop.Products', 'mijoshoppagetypes' => 'MijoShop.PageTypes', 'mijoshopcats' => 'MijoShop.Categories', 'mijoshopproducts' => 'MijoShop.Products', 'redshoppagetypes' => 'RedShop.PageTypes', 'redshopcats' => 'RedShop.Categories', 'redshopproducts' => 'RedShop.Products', 'virtuemartpagetypes' => 'VirtueMart.PageTypes', 'virtuemartcats' => 'VirtueMart.Categories', 'virtuemartproducts' => 'VirtueMart.Products', 'cookieconfirm' => 'CookieConfirm', 'php' => 'PHP');
$this->thirdparty = array('EasyBlog', 'FlexiContent', 'Form2Content', 'K2', 'Zoo', 'AkeebaSubs', 'HikaShop', 'MijoShop', 'RedShop', 'VirtueMart', 'CookieConfirm');
$this->nonarray = array('PHP');
$this->setIdNames();
$this->classes = array();
}
示例7: __construct
public function __construct()
{
$this->db = JFactory::getDBO();
$this->q = $this->db->getQuery(true);
$this->date = JFactory::getDate();
$tz = new DateTimeZone(JFactory::getApplication()->getCfg('offset'));
$this->date->setTimeZone($tz);
$this->has = array();
$this->has['flexicontent'] = nnFrameworkFunctions::extensionInstalled('flexicontent');
$this->has['k2'] = nnFrameworkFunctions::extensionInstalled('k2');
$this->has['zoo'] = nnFrameworkFunctions::extensionInstalled('zoo');
$this->has['akeebasubs'] = nnFrameworkFunctions::extensionInstalled('akeebasubs');
$this->has['hikashop'] = nnFrameworkFunctions::extensionInstalled('hikashop');
$this->has['mijoshop'] = nnFrameworkFunctions::extensionInstalled('mijoshop');
$this->has['redshop'] = nnFrameworkFunctions::extensionInstalled('redshop');
$this->has['virtuemart'] = nnFrameworkFunctions::extensionInstalled('virtuemart');
$this->has['cookieconfirm'] = nnFrameworkFunctions::extensionInstalled('cookieconfirm');
$this->types = array('Menu', 'HomePage', 'DateTime_Date', 'DateTime_Seasons', 'DateTime_Months', 'DateTime_Days', 'DateTime_Time', 'Users_UserGroupLevels', 'Users_Users', 'Languages', 'IPs', 'Geo_Continents', 'Geo_Countries', 'Geo_Regions', 'Templates', 'URLs', 'Agents_OS', 'Agents_Browsers', 'Components', 'Content_PageTypes', 'Content_Categories', 'Content_Articles', 'FlexiContent_PageTypes', 'FlexiContent_Tags', 'FlexiContent_Types', 'K2_PageTypes', 'K2_Categories', 'K2_Tags', 'K2_Items', 'ZOO_PageTypes', 'ZOO_Categories', 'ZOO_Items', 'AkeebaSubs_PageTypes', 'AkeebaSubs_Levels', 'HikaShop_PageTypes', 'HikaShop_Categories', 'HikaShop_Products', 'MijoShop_PageTypes', 'MijoShop_Categories', 'MijoShop_Products', 'RedShop_PageTypes', 'RedShop_Categories', 'RedShop_Products', 'VirtueMart_PageTypes', 'VirtueMart_Categories', 'VirtueMart_Products', 'CookieConfirm', 'PHP');
$this->nonarray = array('PHP');
$this->setIdNames();
$this->classes = array();
}
示例8: getInput
protected function getInput()
{
if (!nnFrameworkFunctions::extensionInstalled('redshop')) {
return '<fieldset class="radio"><label class="nn_label nn_label_error">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_FILES_NOT_FOUND', JText::_('NN_REDSHOP')) . '</label></fieldset>';
}
$this->params = $this->element->attributes();
$this->db = JFactory::getDBO();
$group = $this->get('group', 'categories');
$tables = $this->db->getTableList();
if (!in_array($this->db->getPrefix() . 'redshop_' . ($group == 'products' ? 'product' : 'category'), $tables)) {
return '<fieldset class="radio"><label class="nn_label nn_label_error">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_TABLE_NOT_FOUND', JText::_('NN_REDSHOP')) . '</label></fieldset>';
}
$parameters = nnParameters::getInstance();
$params = $parameters->getPluginParams('nnframework');
$this->max_list_count = $params->max_list_count;
if (!is_array($this->value)) {
$this->value = explode(',', $this->value);
}
$options = $this->{'get' . $group}();
$size = (int) $this->get('size');
$multiple = $this->get('multiple');
require_once JPATH_PLUGINS . '/system/nnframework/helpers/html.php';
return nnHtml::selectlist($options, $this->name, $this->value, $this->id, $size, $multiple);
}