Code Duplication    Length = 16-23 lines in 17 locations

app/module/Albums/Category/One/Admin/AddView.php 1 location

@@ 7-22 (lines=16) @@
4
5
use Rudolf\Framework\View\AdminView;
6
7
class AddView extends AdminView
8
{
9
    public function add($category)
10
    {
11
        $this->category = new Category($category);
12
13
        $this->pageTitle = _('Add category');
14
        $this->head->setTitle($this->pageTitle);
15
16
        $this->path = DIR.'/admin/albums/categories/add';
17
18
        $this->templateType = 'add';
19
20
        $this->template = 'category-one';
21
    }
22
}
23

app/module/Albums/Category/One/Admin/DelView.php 1 location

@@ 7-27 (lines=21) @@
4
5
use Rudolf\Framework\View\AdminView;
6
7
class DelView extends AdminView
8
{
9
    /**
10
     * Set data to delete category.
11
     * 
12
     * @param array $category
13
     */
14
    public function delCategory($category)
15
    {
16
        $this->category = new Category($category);
17
18
        $this->pageTitle = _('Delete category');
19
        $this->head->setTitle($this->pageTitle);
20
21
        $this->path = $this->category->delUrl();
22
23
        $this->templateType = 'del';
24
25
        $this->template = 'categories-del';
26
    }
27
}
28

app/module/Albums/Category/One/Admin/EditView.php 1 location

@@ 7-22 (lines=16) @@
4
5
use Rudolf\Framework\View\AdminView;
6
7
class EditView extends AdminView
8
{
9
    public function edit($category)
10
    {
11
        $this->category = new Category($category);
12
13
        $this->pageTitle = _('Edit category');
14
        $this->head->setTitle($this->pageTitle);
15
16
        $this->path = $this->category->editUrl();
17
18
        $this->templateType = 'edit';
19
20
        $this->template = 'category-one';
21
    }
22
}
23

app/module/Albums/One/Admin/AddView.php 1 location

@@ 8-30 (lines=23) @@
5
use Rudolf\Framework\View\AdminView;
6
use Rudolf\Modules\Categories\CategoryAddon;
7
8
class AddView extends AdminView
9
{
10
    use CategoryAddon;
11
12
    /**
13
     * Set data do add album.
14
     * 
15
     * @param array $album
16
     */
17
    public function addAlbum($album)
18
    {
19
        $this->album = new Album($album);
20
21
        $this->pageTitle = _('Add album');
22
        $this->head->setTitle($this->pageTitle);
23
24
        $this->path = DIR.'/admin/albums/add';
25
26
        $this->templateType = 'add';
27
28
        $this->template = 'albums-one';
29
    }
30
}
31

app/module/Albums/One/Admin/DelView.php 1 location

@@ 8-30 (lines=23) @@
5
use Rudolf\Framework\View\AdminView;
6
use Rudolf\Modules\Categories\CategoryAddon;
7
8
class DelView extends AdminView
9
{
10
    use CategoryAddon;
11
12
    /**
13
     * Set data to delete album.
14
     * 
15
     * @param array $album
16
     */
17
    public function delAlbum($album)
18
    {
19
        $this->album = new Album($album);
20
21
        $this->pageTitle = _('Delete album');
22
        $this->head->setTitle($this->pageTitle);
23
24
        $this->path = $this->album->delUrl();
25
26
        $this->templateType = 'del';
27
28
        $this->template = 'albums-del';
29
    }
30
}
31

app/module/Albums/One/Admin/EditView.php 1 location

@@ 8-30 (lines=23) @@
5
use Rudolf\Framework\View\AdminView;
6
use Rudolf\Modules\Categories\CategoryAddon;
7
8
class EditView extends AdminView
9
{
10
    use CategoryAddon;
11
12
    /**
13
     * Set data to edit album.
14
     * 
15
     * @param array $album
16
     */
17
    public function editAlbum($album)
18
    {
19
        $this->album = new Album($album);
20
21
        $this->pageTitle = _('Edit album');
22
        $this->head->setTitle($this->pageTitle);
23
24
        $this->path = $this->album->editUrl();
25
26
        $this->templateType = 'edit';
27
28
        $this->template = 'albums-one';
29
    }
30
}
31

app/module/Articles/Category/One/Admin/AddView.php 1 location

@@ 7-22 (lines=16) @@
4
5
use Rudolf\Framework\View\AdminView;
6
7
class AddView extends AdminView
8
{
9
    public function add($category)
10
    {
11
        $this->category = new Category($category);
12
13
        $this->pageTitle = _('Add category');
14
        $this->head->setTitle($this->pageTitle);
15
16
        $this->path = DIR.'/admin/articles/categories/add';
17
18
        $this->templateType = 'add';
19
20
        $this->template = 'category-one';
21
    }
22
}
23

app/module/Articles/Category/One/Admin/DelView.php 1 location

@@ 7-27 (lines=21) @@
4
5
use Rudolf\Framework\View\AdminView;
6
7
class DelView extends AdminView
8
{
9
    /**
10
     * Set data to delete category.
11
     * 
12
     * @param array $category
13
     */
14
    public function delCategory($category)
15
    {
16
        $this->category = new Category($category);
17
18
        $this->pageTitle = _('Delete category');
19
        $this->head->setTitle($this->pageTitle);
20
21
        $this->path = $this->category->delUrl();
22
23
        $this->templateType = 'del';
24
25
        $this->template = 'categories-del';
26
    }
27
}
28

app/module/Articles/Category/One/Admin/EditView.php 1 location

@@ 7-22 (lines=16) @@
4
5
use Rudolf\Framework\View\AdminView;
6
7
class EditView extends AdminView
8
{
9
    public function edit($category)
10
    {
11
        $this->category = new Category($category);
12
13
        $this->pageTitle = _('Edit category');
14
        $this->head->setTitle($this->pageTitle);
15
16
        $this->path = $this->category->editUrl();
17
18
        $this->templateType = 'edit';
19
20
        $this->template = 'category-one';
21
    }
22
}
23

app/module/Articles/One/Admin/AddView.php 1 location

@@ 8-30 (lines=23) @@
5
use Rudolf\Framework\View\AdminView;
6
use Rudolf\Modules\Categories\CategoryAddon;
7
8
class AddView extends AdminView
9
{
10
    use CategoryAddon;
11
12
    /**
13
     * Set data do add article.
14
     * 
15
     * @param array $article
16
     */
17
    public function addArticle($article)
18
    {
19
        $this->article = new Article($article);
20
21
        $this->pageTitle = _('Add article');
22
        $this->head->setTitle($this->pageTitle);
23
24
        $this->path = DIR.'/admin/articles/add';
25
26
        $this->templateType = 'add';
27
28
        $this->template = 'articles-one';
29
    }
30
}
31

app/module/Articles/One/Admin/DelView.php 1 location

@@ 8-30 (lines=23) @@
5
use Rudolf\Framework\View\AdminView;
6
use Rudolf\Modules\Categories\CategoryAddon;
7
8
class DelView extends AdminView
9
{
10
    use CategoryAddon;
11
12
    /**
13
     * Set data to delete article.
14
     * 
15
     * @param array $article
16
     */
17
    public function delArticle($article)
18
    {
19
        $this->article = new Article($article);
20
21
        $this->pageTitle = _('Delete article');
22
        $this->head->setTitle($this->pageTitle);
23
24
        $this->path = $this->article->delUrl();
25
26
        $this->templateType = 'del';
27
28
        $this->template = 'articles-del';
29
    }
30
}
31

app/module/Articles/One/Admin/EditView.php 1 location

@@ 8-30 (lines=23) @@
5
use Rudolf\Framework\View\AdminView;
6
use Rudolf\Modules\Categories\CategoryAddon;
7
8
class EditView extends AdminView
9
{
10
    use CategoryAddon;
11
12
    /**
13
     * Set data to edit article.
14
     * 
15
     * @param array $article
16
     */
17
    public function editArticle($article)
18
    {
19
        $this->article = new Article($article);
20
21
        $this->pageTitle = _('Edit article');
22
        $this->head->setTitle($this->pageTitle);
23
24
        $this->path = $this->article->editUrl();
25
26
        $this->templateType = 'edit';
27
28
        $this->template = 'articles-one';
29
    }
30
}
31

app/module/Galleries/One/Admin/AddView.php 1 location

@@ 7-27 (lines=21) @@
4
5
use Rudolf\Framework\View\AdminView;
6
7
class AddView extends AdminView
8
{
9
    /**
10
     * Set data to add gallery.
11
     *
12
     * @param array $gallery
13
     */
14
    public function addGallery($gallery)
15
    {
16
        $this->gallery = new Gallery($gallery);
17
18
        $this->pageTitle = _('Add gallery');
19
        $this->head->setTitle($this->pageTitle);
20
21
        $this->path = DIR.'/admin/galleries/add';
22
23
        $this->templateType = 'add';
24
25
        $this->template = 'gallery-one';
26
    }
27
}
28

app/module/Galleries/One/Admin/EditView.php 1 location

@@ 8-30 (lines=23) @@
5
use Rudolf\Framework\View\AdminView;
6
use Rudolf\Modules\Categories\CategoryAddon;
7
8
class EditView extends AdminView
9
{
10
    use CategoryAddon;
11
12
    /**
13
     * Set data to edit gallery.
14
     *
15
     * @param array $gallery
16
     */
17
    public function editGallery($gallery)
18
    {
19
        $this->gallery = new Gallery($gallery);
20
21
        $this->pageTitle = _('Edit gallery');
22
        $this->head->setTitle($this->pageTitle);
23
24
        $this->path = $this->gallery->editUrl();
25
26
        $this->templateType = 'edit';
27
28
        $this->template = 'gallery-one';
29
    }
30
}
31

app/module/Pages/One/Admin/AddView.php 1 location

@@ 7-29 (lines=23) @@
4
5
use Rudolf\Framework\View\AdminView;
6
7
class AddView extends AdminView
8
{
9
    use PagesAddon;
10
11
    /**
12
     * Set data do add page.
13
     * 
14
     * @param array $page
15
     */
16
    public function addPage($page)
17
    {
18
        $this->page = new Page($page);
19
20
        $this->pageTitle = _('Add page');
21
        $this->head->setTitle($this->pageTitle);
22
23
        $this->path = DIR.'/admin/pages/add';
24
25
        $this->templateType = 'add';
26
27
        $this->template = 'pages-one';
28
    }
29
}
30

app/module/Pages/One/Admin/DelView.php 1 location

@@ 7-27 (lines=21) @@
4
5
use Rudolf\Framework\View\AdminView;
6
7
class DelView extends AdminView
8
{
9
    /**
10
     * Set data to delete page.
11
     * 
12
     * @param array $page
13
     */
14
    public function delPage($page)
15
    {
16
        $this->page = new Page($page);
17
18
        $this->pageTitle = _('Delete page');
19
        $this->head->setTitle($this->pageTitle);
20
21
        $this->path = $this->page->delUrl();
22
23
        $this->templateType = 'del';
24
25
        $this->template = 'pages-del';
26
    }
27
}
28

app/module/Pages/One/Admin/EditView.php 1 location

@@ 7-29 (lines=23) @@
4
5
use Rudolf\Framework\View\AdminView;
6
7
class EditView extends AdminView
8
{
9
    use PagesAddon;
10
11
    /**
12
     * Set data to edit page.
13
     * 
14
     * @param array $page
15
     */
16
    public function editPage($page)
17
    {
18
        $this->page = new Page($page);
19
20
        $this->pageTitle = _('Edit page');
21
        $this->head->setTitle($this->pageTitle);
22
23
        $this->path = $this->page->editUrl();
24
25
        $this->templateType = 'edit';
26
27
        $this->template = 'pages-one';
28
    }
29
}
30