Airship\Engine\Lens::setActiveMotif PHP Method

setActiveMotif() public method

Set the active motif
public setActiveMotif ( string $name ) : boolean
$name string
return boolean
    public function setActiveMotif(string $name) : bool
    {
        $state = State::instance();
        if (\in_array($name, \array_keys($state->motifs))) {
            $this->stored['active_motif'] = $name;
            $this->setBaseTemplate($name);
            return true;
        }
        return false;
    }

Usage Example

Example #1
0
 /**
  * @param string $name
  * @return bool
  */
 protected function setActiveMotif(string $name) : bool
 {
     return $this->airship_lens_object->setActiveMotif($name);
 }