add/change docs

This commit is contained in:
Dennis Eichhorn 2021-08-29 10:55:43 +02:00
parent 60bc825822
commit 1106d74676
2 changed files with 102 additions and 2 deletions

View File

@ -24,33 +24,130 @@ namespace Modules\Navigation\Models;
*/
class NavElement
{
/**
* Id.
*
* @var int
* @since 1.0.0
*/
public int $id = 0;
/**
* Page Id.
*
* Generated from the path from a URI (sha1)
*
* @var string
* @since 1.0.0
*/
public string $pid = '';
/**
* Name of the link.
*
* This "name" is a identifier for which is used in the language file for localization.
*
* @var string
* @since 1.0.0
*/
public string $name = '';
public int $type = 1;
/**
* Link type.
*
* @var int
* @since 1.0.0
*/
public int $type = LinkType::LINK;
public int $subtype = 2;
/**
* Navigation type (location of the link)
*
* @var int
* @since 1.0.0
*/
public int $subtype = NavigationType::SIDE;
/**
* Icon string (css string for icon).
*
* @var null|string
* @since 1.0.0
*/
public ?string $icon = null;
/**
* Uri.
*
* @var null|string
* @since 1.0.0
*/
public ?string $uri = null;
/**
* Link target (target="self").
*
* @var string
* @since 1.0.0
*/
public string $target = 'self';
/**
* Action to perform on click.
*
* @var null|string
* @since 1.0.0
*/
public ?string $action = null;
/**
* Module identifier.
*
* @var string
* @since 1.0.0
*/
public string $from = '0';
/**
* Order.
*
* @var int
* @since 1.0.0
*/
public int $order = 1;
/**
* Parent navigation element.
*
* @var int
* @since 1.0.0
*/
public int $parent = 0;
/**
* User permission required to show link (null = always/any).
*
* @var null|int
* @since 1.0.0
*/
public ?int $permissionPerm = null;
/**
* Permission type required to show link (null = any).
*
* Modules have different permission types (e.g. customer).
* The available types are defind in the respective module in \Modules\???\Models\PermissionState
*
* @var null|int
* @since 1.0.0
*/
public ?int $permissionType = null;
/**
* Element these permissions must be valid for (null = any).
*
* @var null|int
* @since 1.0.0
*/
public ?int $permissionElement = null;
}

View File

@ -47,6 +47,9 @@ class SearchControllerTest extends \PHPUnit\Framework\TestCase
*/
protected ModuleAbstract $module;
/**
* {@inheritdoc}
*/
protected function setUp() : void
{
$this->app = new class() extends ApplicationAbstract