weblinks/src/administrator/components/com_weblinks/Extension/WeblinksComponent.php

58 lines
1.4 KiB
PHP

<?php
/**
* @package Joomla.Administrator
* @subpackage com_contact
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Component\Weblinks\Administrator\Extension;
defined('JPATH_PLATFORM') or die;
use Joomla\CMS\Association\AssociationServiceInterface;
use Joomla\CMS\Association\AssociationServiceTrait;
use Joomla\CMS\Categories\CategoryServiceInterface;
use Joomla\CMS\Categories\CategoryServiceTrait;
use Joomla\CMS\Extension\MVCComponent;
/**
* Component class for com_contact
*
* @since 4.0.0
*/
class WeblinksComponent extends MVCComponent implements CategoryServiceInterface, AssociationServiceInterface
{
use CategoryServiceTrait;
use AssociationServiceTrait;
/**
* Returns the table for the count items functions for the given section.
*
* @param string $section The section
*
* @return string|null
*
* @since 4.0.0
*/
protected function getTableNameForSection(string $section = null)
{
return ($section === 'category' ? 'categories' : 'weblinks');
}
/**
* Returns the state column for the count items functions for the given section.
*
* @param string $section The section
*
* @return string|null
*
* @since 4.0.0
*/
protected function getStateColumnForSection(string $section = null)
{
return 'published';
}
}