Gdn_Theme::inSection PHP Method

inSection() public static method

Returns whether or not the page is in the current section.
public static inSection ( string | array $Section )
$Section string | array
    public static function inSection($Section)
    {
        $Section = (array) $Section;
        foreach ($Section as $Name) {
            if (isset(self::$_Section[$Name])) {
                return true;
            }
        }
        return false;
    }

Usage Example

Esempio n. 1
0
 /**
  * Returns whether or not the page is in one of the given section(s).
  *
  * @param string|array $Section
  * @return bool
  * @since 2.1
  */
 function inSection($Section)
 {
     return Gdn_Theme::inSection($Section);
 }
All Usage Examples Of Gdn_Theme::inSection