JTableExtension/check: Difference between revisions
From Joomla! Documentation
New page: ===Description===
Overloaded check function
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki>... |
m clean up |
||
| Line 2: | Line 2: | ||
Overloaded check function | Overloaded check function | ||
{{Description:JTableExtension/check}} | |||
{{subst:Description:JTableExtension/check}} | |||
===Syntax=== | ===Syntax=== | ||
| Line 33: | Line 31: | ||
</source> | </source> | ||
{{subst:SeeAlso:JTableExtension/check}} | |||
{{SeeAlso:JTableExtension/check}} | |||
===Examples=== | ===Examples=== | ||
Revision as of 14:30, 24 March 2017
Description
Overloaded check function
{{subst:Description:JTableExtension/check}}
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;
}
{{subst:SeeAlso:JTableExtension/check}}
Examples
<CodeExamplesForm />