- md5
- 9a4bd952652dbcb12e6907465efd483d
- sha1
- 553975bfb531c1c7640d58bce040bcde2f5a5225
- sha256
- 66bd0b9601507fbbe30c78891a2b52032c2056717b99898941027d7e2dc7150c
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
<?php
/**
* @package Joomla.Administrator
* @subpackage com_finder
*
* @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Component\Finder\Administrator\Table;
\defined('_JEXEC') or die;
use Joomla\CMS\Application\ApplicationHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Table\Nested;
use Joomla\Database\DatabaseDriver;
/**
* Map table class for the Finder package.
*
* @since 2.5
*/
class MapTable extends Nested
{
/**
* Constructor
*
* @param DatabaseDriver $db Database Driver connector object.
*
* @since 2.5
*/
public function __construct(DatabaseDriver $db)
{
parent::__construct('#__finder_taxonomy', 'id', $db);
$this->setColumnAlias('published', 'state');
$this->access = (int) Factory::getApplication()->get('access');
}
/**
* Override check function
*
* @return boolean
*
* @see Table::check()
* @since 4.0.0
*/
public function check()
{
try
{
parent::check();
}
catch (\Exception $e)
{
$this->setError($e->getMessage());
return false;
}
// Check for a title.
if (trim($this->title) == '')
{
$this->setError(Text::_('JLIB_DATABASE_ERROR_MUSTCONTAIN_A_TITLE_CATEGORY'));
return false;
}
$this->alias = ApplicationHelper::stringURLSafe($this->title, $this->language);
if (trim($this->alias) == '')
{
$this->alias = md5(serialize($this->getProperties()));
}
return true;
}
}
The same content is in 51 releases, Joomla 4.0.0-beta6 to 4.2.0-beta2. See them all, or every version of this file.