Actions

API15

Difference between revisions of "JTable/check"

From Joomla! Documentation

< API15:JTable
(Examples)
m (removing red link to edit, no existant pages)
 
(One intermediate revision by one user 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===
 +
<source lang="php">function check() {
 +
    if($this->title == ''){
 +
        $this->setError(JText::_('This record requires a title'));
 +
        return false;
 +
    }
 +
    return true;
 +
}</source>
 
<CodeExamplesForm />
 
<CodeExamplesForm />
 
<dpl>
 
<dpl>
Line 44: Line 51:
 
  format= ,,,
 
  format= ,,,
 
</dpl>
 
</dpl>
<source lang="php">function check() {
+
[[Category:Archived pages API15]]
    if($this->title == ''){
+
        $this->setError(JText::_('This record requires a title'));
+
        return false;
+
    }
+
    return true;
+
}</source>
+

Latest revision as of 13:51, 12 May 2013

Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Contents

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;
}

<CodeExamplesForm />