JTableModule/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:JTableModule/check}} | |||
{{subst:Description:JTableModule/check}} | |||
===Syntax=== | ===Syntax=== | ||
| Line 35: | Line 33: | ||
</source> | </source> | ||
{{subst:SeeAlso:JTableModule/check}} | |||
{{SeeAlso:JTableModule/check}} | |||
===Examples=== | ===Examples=== | ||
Revision as of 14:30, 24 March 2017
Description
Overloaded check function.
{{subst:Description:JTableModule/check}}
Syntax
check()
Returns
boolean True if the object is ok
Defined in
libraries/joomla/database/table/module.php
Importing
jimport( 'joomla.database.table.module' );
Source Body
public function check()
{
// check for valid name
if (trim($this->title) == '')
{
$this->setError(JText::sprintf('MUST_CONTAIN_A_TITLE', JText::_('Module')));
return false;
}
return true;
}
{{subst:SeeAlso:JTableModule/check}}
Examples
<CodeExamplesForm />