public static function fromArray(array $definition): NavItem
    {
        return new static(
            $definition['title'],
            (bool) $definition['active'],
            $definition['cssId'] ?? null,
            $definition['navCssId'] ?? null
        );
    }
public static function fromArray(array $definition): NavItem
    {
        return new static(
            $definition['title'],
            (bool) $definition['active'],
            $definition['cssId'] ?? null,
            $definition['navCssId'] ?? null
        );
    }
public static function fromArray ( array $ definition ) : NavItem { return new static ( $ definition [ 'title' ] , ( bool ) $ definition [ 'active' ] , $ definition [ 'cssId' ] ?? null , $ definition [ 'navCssId' ] ?? null ) ; }
Create nav item from an array definition.

@param array $definition The array definition.

@return NavItem
Create nav item from an array definition .