1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-05-03 17:39:24 +03:00
ifhub.club/application/classes/actions/ActionArchive.class.php

56 lines
1.2 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/**
* Страницы с архивами
*
* @package application.actions
* @since 1.0
*/
class ActionArchive extends Action
{
/**
* Инициализация экшена
*
*/
public function Init()
{
/**
* Устанавливаем дефолтный евент
*/
$this->SetDefaultEvent('index');
}
/**
* Регистрируем евенты
*
*/
protected function RegisterEvent()
{
$this->AddEvent('index', 'EventIndex');
$this->AddEvent('wiki', 'EventIfwiki');
}
/**
* Вывод списка архивов
*
*/
protected function EventIndex()
{
/**
* Устанавливаем title страницы
*/
$this->Viewer_AddHtmlTitle('Архивы');
$this->SetTemplateAction('index');
}
/**
* Архивы вики
*/
protected function EventIfwiki()
{
$this->Viewer_AddHtmlTitle('Архивы IFWiki');
$files = array_slice(scandir('./wikidump'), 2);
$this->SetTemplateAction('archive');
$this->Viewer_Assign('files', $files);
}
}