Files
RecoReco/Plugin.php

67 lines
1.9 KiB
PHP

<?php
namespace Kanboard\Plugin\RecoReco;
use Kanboard\Core\Plugin\Base;
class Plugin extends Base
{
public function initialize()
{
// "Recurring schedule" entry in the task Actions sidebar, right after the basic actions
// (next to native "Edit recurrence"). Opens the RecoReco config modal.
$this->template->hook->attach('template:task:sidebar:after-basic-actions', 'recoReco:task/sidebar_action');
// Modal JS: keep "days before" within one period of the selected frequency.
$this->hook->on('template:layout:js', array(
'template' => 'plugins/RecoReco/Asset/js/recoreco-modal.js',
));
// Board card icon: black on a recurring template, white (inverse) on a generated copy.
$this->template->hook->attach('template:board:task:icons', 'recoReco:board/task_icon');
// The scheduling engine runs from the CLI (cron). Registered CLI-only so web requests do
// not build the console app.
if (php_sapi_name() === 'cli') {
$this->container['cli']->add(new \Kanboard\Plugin\RecoReco\Console\RecoRecoCommand($this->container));
}
}
public function getHelpers()
{
return array(
'Plugin\RecoReco\Helper' => array('RecoRecoHelper'),
);
}
public function getPluginName()
{
return 'RecoReco';
}
public function getPluginDescription()
{
return t('Calendar-scheduled recurring cards: a template card spawns a copy on a date (yearly, monthly, weekly, daily), driven by the card due date.');
}
public function getPluginAuthor()
{
return 'Ruben (drbeco)';
}
public function getPluginVersion()
{
return '1.2.0';
}
public function getPluginHomepage()
{
return 'https://code.beco.cc/beco/RecoReco';
}
public function getCompatibleVersion()
{
return '>=1.2.0';
}
}