public function __construct() { // Set up the namespace for our class. $this->css_class = strtolower(__CLASS__); // Start our icon class. $svg = new CSST_Nav_SVG(); // Grab a triangle for our submenu toggles. $icon = $svg->get(); $this->icon = $icon; }
/** * Output our icon. * * @return mixed False if we have already defined the icon, else void. */ public function the_icon_definition() { // Have we already defined our icon? If so, bail. if (self::$got_svg) { return FALSE; } // Set the flag to true so we don't output this twice. self::$got_svg = TRUE; // Grab the icon definition. $out = $this->get_icon_definition(); // Output the icon definition. echo $out; }