| Server IP : 104.21.84.107 / Your IP : 104.23.243.196 Web Server : Apache/2.4.63 (Ubuntu) System : Linux adminpruebas-Virtual-Machine 6.14.0-37-generic #37-Ubuntu SMP PREEMPT_DYNAMIC Fri Nov 14 22:10:32 UTC 2025 x86_64 User : www-data ( 33) PHP Version : 8.4.5 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/html/ictiologia/api/components/com_media/src/View/Media/ |
Upload File : |
<?php
/**
* @package Joomla.API
* @subpackage com_media
*
* @copyright (C) 2021 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Component\Media\Api\View\Media;
use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;
use Joomla\Component\Media\Administrator\Provider\ProviderManagerHelperTrait;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects
/**
* Media web service view
*
* @since 4.1.0
*/
class JsonapiView extends BaseApiView
{
use ProviderManagerHelperTrait;
/**
* The fields to render item in the documents
*
* @var array
* @since 4.1.0
*/
protected $fieldsToRenderItem = [
'type',
'name',
'path',
'extension',
'size',
'mime_type',
'width',
'height',
'create_date',
'create_date_formatted',
'modified_date',
'modified_date_formatted',
'thumb_path',
'adapter',
'content',
'url',
'tempUrl',
];
/**
* The fields to render items in the documents
*
* @var array
* @since 4.1.0
*/
protected $fieldsToRenderList = [
'type',
'name',
'path',
'extension',
'size',
'mime_type',
'width',
'height',
'create_date',
'create_date_formatted',
'modified_date',
'modified_date_formatted',
'thumb_path',
'adapter',
'content',
'url',
'tempUrl',
];
/**
* Prepare item before render.
*
* @param object $item The model item
*
* @return object
*
* @since 4.1.0
*/
protected function prepareItem($item)
{
// Media resources have no id.
$item->id = '0';
return $item;
}
}