autofixes

This commit is contained in:
Dennis Eichhorn 2020-08-30 20:13:11 +02:00
parent 5f04305326
commit 412c14e08d
4 changed files with 9 additions and 7 deletions

View File

@ -27,6 +27,8 @@ use phpOMS\Stdlib\Base\Enum;
abstract class PermissionState extends Enum
{
public const CATEGORY = 1;
public const WIKI = 2;
public const APP = 3;
}

View File

@ -23,20 +23,20 @@ echo $this->getData('nav')->render();
<div class="row">
<div class="col-xs-12">
<div class="portlet">
<div class="portlet-head"><?= $this->getHtml('Categories') ?><i class="fa fa-download floatRight download btn"></i></div>
<div class="portlet-head"><?= $this->getHtml('Categories'); ?><i class="fa fa-download floatRight download btn"></i></div>
<table class="default">
<thead>
<tr>
<td><?= $this->getHtml('ID', '0', '0'); ?>
<td class="wf-100"><?= $this->getHtml('Name') ?>
<td><?= $this->getHtml('Parent') ?>
<td class="wf-100"><?= $this->getHtml('Name'); ?>
<td><?= $this->getHtml('Parent'); ?>
<tbody>
<?php foreach ($categories as $key => $value) :
$url = UriFactory::build('{/prefix}admin/account/settings?{?}&id=' . $value->getId()); ?>
<tr tabindex="0" data-href="<?= $url; ?>">
<td data-label="<?= $this->getHtml('ID', '0', '0') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getId()); ?></a>
<td data-label="<?= $this->getHtml('Name') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
<td data-label="<?= $this->getHtml('Parent') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getParent() !== null ? $value->getParent()->getName() : ''); ?></a>
<td data-label="<?= $this->getHtml('ID', '0', '0'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getId()); ?></a>
<td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
<td data-label="<?= $this->getHtml('Parent'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getParent() !== null ? $value->getParent()->getName() : ''); ?></a>
<?php endforeach; ?>
<?php if (empty($categories)) : ?>
<tr><td colspan="3" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>

View File

@ -20,6 +20,7 @@ namespace Modules\Knowledgebase\tests\Admin;
class AdminTest extends \PHPUnit\Framework\TestCase
{
protected const MODULE_NAME = 'Knowledgebase';
protected const URI_LOAD = 'http://127.0.0.1/en/backend/wiki';
use \Modules\tests\ModuleTestTrait;

View File

@ -32,7 +32,6 @@ class WikiCategoryTest extends \PHPUnit\Framework\TestCase
$this->category = new WikiCategory();
}
/**
* @testdox The model has the expected default values after initialization
* @covers Modules\Knowledgebase\Models\WikiApp