API15

Difference between revisions of "JView/setLayoutExt"

From Joomla! Documentation

< API15:JView
(New page: ===Description=== Allows a different extension for the layout files to be used <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>[[Description:JView/setLayoutExt|Edi...)
 
Line 32: Line 32:
 
===Source Body===
 
===Source Body===
 
<source lang="php">
 
<source lang="php">
function setLayoutExt($value)
+
function setLayoutExt( $value )
 
{
 
{
 
         $previous      = $this->_layoutExt;
 
         $previous      = $this->_layoutExt;
         if ($value = preg_replace('#[^A-Za-z0-9]#', '', trim($value))) {
+
         if ($value = preg_replace( '#[^A-Za-z0-9]#', '', trim( $value ) )) {
 
                 $this->_layoutExt = $value;
 
                 $this->_layoutExt = $value;
 
         }
 
         }

Revision as of 17:10, 22 March 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]

Allows a different extension for the layout files to be used

[Edit Descripton]

Template:Description:JView/setLayoutExt

Syntax[edit]

setLayoutExt($value)
Parameter Name Default Value Description
$value The extension

Returns[edit]

string Previous value

Defined in[edit]

libraries/joomla/application/component/view.php

Importing[edit]

jimport( 'joomla.application.component.view' );

Source Body[edit]

function setLayoutExt( $value )
{
        $previous       = $this->_layoutExt;
        if ($value = preg_replace( '#[^A-Za-z0-9]#', '', trim( $value ) )) {
                $this->_layoutExt = $value;
        }
        return $previous;
}

[Edit See Also] Template:SeeAlso:JView/setLayoutExt

Examples[edit]

<CodeExamplesForm />