Difference between revisions of "JTable/check"
From Joomla! Documentation
< API15:JTable
Mattlaughs (talk | contribs) |
Mattlaughs (talk | contribs) |
||
Line 44: | Line 44: | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
− | < | + | <source lang="php">function check() { |
− | + | if($this->title == ''){ | |
− | + | $this->setError(JText::_('This record requires a title')); | |
− | + | return false; | |
− | + | } | |
− | + | return true; | |
− | + | }</source> | |
− | |||
− | |||
− | |||
− | </ |
Revision as of 11:13, 1 August 2010
The "API15" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
Description[edit]
Generic check method
Template:Description:JTable/check
Syntax[edit]
check()
Returns[edit]
boolean True if the object is ok
Defined in[edit]
libraries/joomla/database/table.php
Importing[edit]
jimport( 'joomla.database.table' );
Source Body[edit]
function check()
{
return true;
}
[Edit See Also] Template:SeeAlso:JTable/check
Examples[edit]
<CodeExamplesForm />
function check() {
if($this->title == ''){
$this->setError(JText::_('This record requires a title'));
return false;
}
return true;
}