Redaxscript\Breadcrumb::init PHP Method

init() public method

init the class
Since: 2.6.0
public init ( array $optionArray = [] )
$optionArray array options of the breadcrumb
    public function init($optionArray = [])
    {
        if (is_array($optionArray)) {
            $this->_optionArray = array_merge($this->_optionArray, $optionArray);
        }
        if (!$this->_optionArray['divider']) {
            $this->_optionArray['divider'] = Db::getSetting('divider');
        }
        $this->_create();
    }

Usage Example

Example #1
0
 /**
  * breadcrumb
  *
  * @since 2.3.0
  *
  * @return string
  */
 public static function breadcrumb()
 {
     $breadcrumb = new Breadcrumb(Registry::getInstance(), Language::getInstance());
     $breadcrumb->init();
     return $breadcrumb->render();
 }
All Usage Examples Of Redaxscript\Breadcrumb::init