API15

JTable/check: Difference between revisions

From Joomla! Documentation

m preparing for archive only
 
(3 intermediate revisions by 2 users not shown)
Line 3: Line 3:


<span class="editsection" style="font-size:76%;">
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[Description:JTable/check|Edit Descripton]]<nowiki>]</nowiki>
<nowiki>[<! removed edit link to red link >]</nowiki>
</span>
</span>


{{Description:JTable/check}}
<! removed transcluded page call, red link never existed >


===Syntax===
===Syntax===
Line 29: Line 29:


<span class="editsection" style="font-size:76%;">
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[SeeAlso:JTable/check|Edit See Also]]<nowiki>]</nowiki>
<nowiki>[<! removed edit link to red link >]</nowiki>
</span>
</span>
{{SeeAlso:JTable/check}}
<! removed transcluded page call, red link never existed >


===Examples===
===Examples===
<CodeExamplesForm />
<source lang="php">function check() {
    if($this->title == ''){
        $this->setError(JText::_('This record requires a title'));
        return false;
    }
    return true;
}</source>
=== Code Examples ===
<dpl>
<dpl>
  noresultsheader=\n
  noresultsheader=\n
  category=check
  category=check
  category=JTable
  category=JTable
  category=CodeExample
  namespace=CodeExample
  category=MethodExample
  category=MethodExample
  include=*
  include=*
  format= ,,,
  format= ,,,
</dpl>
</dpl>
<code>
[[Category:Archived pages API15]]
function check() {
if($this->title == ''){
$this->setError(JText::_('This record requires a title'));
return false;
}
return true;
}
 
</code>

Latest revision as of 01:10, 25 March 2017

Description

Generic check method

[<! removed edit link to red link >]

<! removed transcluded page call, red link never existed >

Syntax

check()


Returns

boolean True if the object is ok

Defined in

libraries/joomla/database/table.php

Importing

jimport( 'joomla.database.table' );

Source Body

function check()
{
        return true;
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples

function check() {
    if($this->title == ''){
        $this->setError(JText::_('This record requires a title')); 
        return false;
    }
    return true;
}

Code Examples