API16

JTableViewlevel/check: Difference between revisions

From Joomla! Documentation

Doxiki (talk | contribs)
New page: ===Description=== Method to check the current record to save <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<...
 
m clean up
Line 2: Line 2:
Method to check the current record to save
Method to check the current record to save


<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[Description:JTableViewlevel/check|Edit Descripton]]<nowiki>]</nowiki>
</span>


{{Description:JTableViewlevel/check}}
 
{{subst:Description:JTableViewlevel/check}}


===Syntax===
===Syntax===
Line 35: Line 33:
</source>
</source>


<span class="editsection" style="font-size:76%;">
 
<nowiki>[</nowiki>[[SeeAlso:JTableViewlevel/check|Edit See Also]]<nowiki>]</nowiki>
{{subst:SeeAlso:JTableViewlevel/check}}
</span>
{{SeeAlso:JTableViewlevel/check}}


===Examples===
===Examples===

Revision as of 14:32, 24 March 2017

Description

Method to check the current record to save


{{subst:Description:JTableViewlevel/check}}

Syntax

check()


Returns

boolean True on success

Defined in

libraries/joomla/database/table/viewlevel.php

Importing

jimport( 'joomla.database.table.viewlevel' );

Source Body

function check()
{
        // Validate the title.
        if ((trim($this->title)) == '')
        {
                $this->setError(JText::_('Viewlevel must have a title'));
                return false;
        }

        return true;
}


{{subst:SeeAlso:JTableViewlevel/check}}

Examples

<CodeExamplesForm />