JTableExtension/check: Difference between revisions
From Joomla! Documentation
m clean up |
m preparing for archive only |
||
| Line 4: | Line 4: | ||
===Syntax=== | ===Syntax=== | ||
| Line 32: | Line 32: | ||
===Examples=== | ===Examples=== | ||
=== Code Examples === | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=check | category=check | ||
category=JTableExtension | category=JTableExtension | ||
namespace=CodeExample | |||
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
Latest revision as of 02:10, 25 March 2017
Description
Overloaded check function
Syntax
check()
Returns
boolean True if the object is ok
Defined in
libraries/joomla/database/table/extension.php
Importing
jimport( 'joomla.database.table.extension' );
Source Body
function check()
{
// check for valid name
if (trim($this->name) == '' || trim($this->element) == '') {
$this->setError(JText::sprintf('MUST_CONTAIN_A_TITLE', JText::_('Extension')));
return false;
}
return true;
}
Examples
Code Examples