本文整理汇总了PHP中Component::isEnabled方法的典型用法代码示例。如果您正苦于以下问题:PHP Component::isEnabled方法的具体用法?PHP Component::isEnabled怎么用?PHP Component::isEnabled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Component
的用法示例。
在下文中一共展示了Component::isEnabled方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isEnabled
/**
* Checks if the component is enabled
*
* @param string $option The component option.
* @param boolean $strict If set and the component does not exist, false will be returned.
*
* @return boolean
*
* @since 11.1
*/
public static function isEnabled($option, $strict = false)
{
if (!self::isLegacy()) {
return \Component::isEnabled($option, $strict);
}
$result = self::getComponent($option, $strict);
return $result->enabled | JFactory::getApplication()->isAdmin();
}
示例2: foreach
if ($this->categories) {
?>
<div class="grid">
<div class="col span3">
<h2><?php
echo Lang::txt('Categories');
?>
</h2>
</div><!-- / .col span3 -->
<div class="col span9 omega">
<div class="grid">
<?php
$i = 0;
$clm = '';
foreach ($this->categories as $category) {
if ($category->id == 7 && !Component::isEnabled('com_tools', true)) {
continue;
}
$i++;
switch ($i) {
case 3:
$clm = 'omega';
break;
case 2:
$clm = '';
break;
case 1:
default:
$clm = '';
break;
}
示例3: defined
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*/
// No direct access
defined('_HZEXEC_') or die;
$this->css()->css('features');
$html = '';
$wishlist = Component::isEnabled('com_wishlist');
?>
<header id="content-header">
<h2><?php
echo $this->title;
?>
</h2>
<div id="content-header-extra">
<ul id="useroptions">
<li><a class="btn icon-add" href="<?php
echo Route::url('index.php?option=' . $this->option . '&task=start');
?>
"><?php
echo Lang::txt('COM_PROJECTS_START_NEW');
?>
示例4: foreach
}
?>
<section class="main section">
<div class="subject">
<div class="grid">
<?php
if ($this->types) {
$i = 0;
$clm = '';
foreach ($this->types as $type) {
if ($type->contributable != 1) {
continue;
}
if ($type->alias == 'tools') {
if (!Component::isEnabled('com_tools', true)) {
continue;
}
$url = Route::url('index.php?option=com_tools&task=create');
} else {
$url = Route::url('index.php?option=' . $this->option . '&task=draft&step=' . $this->step . '&type=' . $type->id . ($this->group ? '&group=' . $this->group : ''));
}
$i++;
switch ($i) {
case 3:
$clm = 'omega';
break;
case 2:
$clm = '';
break;
case 1:
示例5:
echo Lang::txt('COM_KB_HAVE_A_FEATURE_REQUEST');
?>
<a href="<?php
echo Route::url('index.php?option=com_wishlist');
?>
"><?php
echo Lang::txt('COM_KB_FEATURE_TELL_US');
?>
</a>
</p>
</div><!-- / .container -->
<?php
}
?>
<?php
if (Component::isEnabled('com_support')) {
?>
<div class="container">
<h3><?php
echo Lang::txt('COM_KB_TROUBLE_REPORT');
?>
</h3>
<p>
<?php
echo Lang::txt('COM_KB_TROUBLE_FOUND_BUG');
?>
<a href="<?php
echo Route::url('index.php?option=com_support&controller=tickets&task=new');
?>
"><?php
echo Lang::txt('COM_KB_TROUBLE_TELL_US');
示例6: foreach
?>
<ul class="entries-menu filter-options">
<li>
<select name="type" id="filter-type">
<option value="" <?php
echo !$this->filters['type'] ? ' selected="selected"' : '';
?>
><?php
echo Lang::txt('COM_RESOURCES_ALL_TYPES');
?>
</option>
<?php
foreach ($this->types as $item) {
?>
<?php
if ($item->id == 7 && !Component::isEnabled('com_tools', true)) {
continue;
}
?>
<option value="<?php
echo $item->id;
?>
"<?php
echo $this->filters['type'] == $item->id ? ' selected="selected"' : '';
?>
><?php
echo $this->escape(stripslashes($item->type));
?>
</option>
<?php
}
示例7:
<p><?php
echo Lang::txt('COM_GROUPS_BROWSE_ASIDE_SECTION_ONE_DEATAILS_ONE');
?>
</p>
<p><?php
echo Lang::txt('COM_GROUPS_BROWSE_ASIDE_SECTION_ONE_DEATAILS_TWO');
?>
</p>
<p><?php
echo Lang::txt('COM_GROUPS_BROWSE_ASIDE_SECTION_ONE_DEATAILS_THREE');
?>
</p>
</div><!-- / .container -->
<?php
if (Component::isEnabled('com_members')) {
?>
<div class="container">
<h3><?php
echo Lang::txt('COM_GROUPS_BROWSE_ASIDE_SECTION_TWO_TITLE');
?>
</h3>
<p><?php
echo Lang::txt('COM_GROUPS_BROWSE_ASIDE_SECTION_TWO_DEATAILS', Route::url('index.php?option=com_members'));
?>
</p>
</div><!-- / .container -->
<?php
}
?>
</aside><!-- / .aside -->