Gdn_Theme::bulletItem PHP Method

bulletItem() public static method

Call before writing an item and it will optionally write a bullet seperator.
Since: 2.1
public static bulletItem ( string $Section, boolean $Return = true ) : string
$Section string The name of the section.
$Return boolean whether or not to return the result or echo it.
return string
    public static function bulletItem($Section, $Return = true)
    {
        $Result = '';
        if (self::$_BulletSection === false) {
            self::$_BulletSection = $Section;
        } elseif (self::$_BulletSection != $Section) {
            $Result = "<!-- {$Section} -->" . self::$_BulletSep;
            self::$_BulletSection = $Section;
        }
        if ($Return) {
            return $Result;
        } else {
            echo $Result;
        }
    }

Usage Example

 /**
  * Add 'Facebook' option to the row.
  */
 public function base_afterReactions_handler($Sender, $Args)
 {
     if (!$this->socialReactions()) {
         return;
     }
     echo Gdn_Theme::bulletItem('Share');
     $this->addReactButton($Sender, $Args);
 }
All Usage Examples Of Gdn_Theme::bulletItem