PhpSchool\CliMenu\CliMenuBuilder::getMenuStyle PHP Method

getMenuStyle() private method

Recursively drop back to the parents menu style when the current menu has a parent and has no changes
private getMenuStyle ( ) : MenuStyle
return MenuStyle
    private function getMenuStyle()
    {
        if (null === $this->parent) {
            return $this->buildStyle();
        }
        if ($this->style !== MenuStyle::getDefaultStyleValues()) {
            return $this->buildStyle();
        }
        return $this->parent->getMenuStyle();
    }

Usage Example

Example #1
0
 /**
  * Recursively drop back to the parents menu style
  * when the current menu has a parent and has no changes
  *
  * @return MenuStyle
  */
 private function getMenuStyle()
 {
     if (null === $this->parent) {
         return $this->buildStyle();
     }
     if ($this->style !== MenuStyle::getDefaultStyleValues()) {
         return $this->buildStyle();
     }
     return $this->parent->getMenuStyle();
 }
All Usage Examples Of PhpSchool\CliMenu\CliMenuBuilder::getMenuStyle