File manager - Edit - /home/opticamezl/www/newok/Tag.zip
Back
PK pD�\�H�d� � TaggableTableTrait.phpnu �[��� <?php /** * Joomla! Content Management System * * @copyright (C) 2020 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Tag; use Joomla\CMS\Helper\TagsHelper; // phpcs:disable PSR1.Files.SideEffects \defined('JPATH_PLATFORM') or die; // phpcs:enable PSR1.Files.SideEffects /** * Defines the trait for a Taggable Table Class. * * @since 3.10.0 */ trait TaggableTableTrait { /** * The tags helper property * * @var TagsHelper * @since 4.0.0 * @note The tags helper property is set to public for backwards compatibility for Joomla 4.0. It will be made a * protected property in Joomla 5.0 */ public $tagsHelper; /** * Get the tags helper * * @return TagsHelper The tags helper object * * @since 4.0.0 */ public function getTagsHelper(): ?TagsHelper { return $this->tagsHelper; } /** * Set the tags helper * * @param TagsHelper $tagsHelper The tags helper to be set * * @return void * * @since 4.0.0 */ public function setTagsHelper(TagsHelper $tagsHelper): void { $this->tagsHelper = $tagsHelper; } /** * Clears the tags helper * * @return void * * @since 4.0.0 */ public function clearTagsHelper(): void { $this->tagsHelper = null; } } PK pD�\cy�� TagApiSerializerTrait.phpnu �[��� <?php /** * Joomla! Content Management System * * @copyright (C) 2020 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Tag; use Joomla\CMS\Router\Route; use Joomla\CMS\Serializer\JoomlaSerializer; use Joomla\CMS\Uri\Uri; use Tobscure\JsonApi\Collection; use Tobscure\JsonApi\Relationship; use Tobscure\JsonApi\Resource; // phpcs:disable PSR1.Files.SideEffects \defined('JPATH_PLATFORM') or die; // phpcs:enable PSR1.Files.SideEffects /** * Trait for implementing tags in an API Serializer * * @since 4.0.0 */ trait TagApiSerializerTrait { /** * Build tags relationship * * @param \stdClass $model Item model * * @return Relationship * * @since 4.0.0 */ public function tags($model) { $resources = []; $serializer = new JoomlaSerializer('tags'); foreach ($model->tags as $id => $tagName) { $resources[] = (new Resource($id, $serializer)) ->addLink('self', Route::link('site', Uri::root() . 'api/index.php/v1/tags/' . $id)); } $collection = new Collection($resources, $serializer); return new Relationship($collection); } } PK pD�\;�� � TaggableTableInterface.phpnu �[��� <?php /** * Joomla! Content Management System * * @copyright (C) 2020 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Tag; use Joomla\CMS\Helper\TagsHelper; use Joomla\CMS\Table\TableInterface; // phpcs:disable PSR1.Files.SideEffects \defined('JPATH_PLATFORM') or die; // phpcs:enable PSR1.Files.SideEffects /** * Interface for a taggable Table class * * @since 3.10.0 */ interface TaggableTableInterface extends TableInterface { /** * Get the type alias for the tags mapping table * * The type alias generally is the internal component name with the * content type. Ex.: com_content.article * * @return string The alias as described above * * @since 4.0.0 */ public function getTypeAlias(); /** * Get the tags helper * * @return ?TagsHelper The tags helper object * * @since 4.0.0 */ public function getTagsHelper(): ?TagsHelper; /** * Set the tags helper * * @param TagsHelper $tagsHelper The tags helper object * * @return void * * @since 4.0.0 */ public function setTagsHelper(TagsHelper $tagsHelper): void; /** * Clears a set tags helper * * @return void * * @since 4.0.0 */ public function clearTagsHelper(): void; } PK pD�\�s�- - TagServiceInterface.phpnu �[��� <?php /** * Joomla! Content Management System * * @copyright (C) 2020 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Tag; // phpcs:disable PSR1.Files.SideEffects \defined('JPATH_PLATFORM') or die; // phpcs:enable PSR1.Files.SideEffects /** * Access to component specific tagging information. * * @since 4.0.0 */ interface TagServiceInterface { /** * Adds Count Items for Tag Manager. * * @param \stdClass[] $items The content objects * @param string $extension The name of the active view. * * @return void * * @since 4.0.0 * @throws \Exception */ public function countTagItems(array $items, string $extension); } PK pD�\�͖�� � TagServiceTrait.phpnu �[��� <?php /** * Joomla! Content Management System * * @copyright (C) 2020 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Tag; use Joomla\CMS\Helper\ContentHelper; // phpcs:disable PSR1.Files.SideEffects \defined('JPATH_PLATFORM') or die; // phpcs:enable PSR1.Files.SideEffects /** * Trait for component tags service. * * @since 4.0.0 */ trait TagServiceTrait { /** * Adds Count Items for Tag Manager. * * @param \stdClass[] $items The content objects * @param string $extension The name of the active view. * * @return void * * @since 4.0.0 */ public function countTagItems(array $items, string $extension) { $parts = explode('.', $extension); $section = \count($parts) > 1 ? $parts[1] : null; $config = (object) [ 'related_tbl' => $this->getTableNameForSection($section), 'state_col' => $this->getStateColumnForSection($section), 'group_col' => 'tag_id', 'extension' => $extension, 'relation_type' => 'tag_assigments', ]; ContentHelper::countRelations($items, $config); } /** * 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 null; } /** * 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 'state'; } } PK pD�\�H�d� � TaggableTableTrait.phpnu �[��� PK pD�\cy�� ! TagApiSerializerTrait.phpnu �[��� PK pD�\;�� � l TaggableTableInterface.phpnu �[��� PK pD�\�s�- - W TagServiceInterface.phpnu �[��� PK pD�\�͖�� � � TagServiceTrait.phpnu �[��� PK � �
| ver. 1.4 |
Github
|
.
| PHP 8.3.23 | Generation time: 0 |
proxy
|
phpinfo
|
Settings