Verified Commit 6fb97598 authored by dockx thibault's avatar dockx thibault
Browse files

:sparkles: Feat(Tasks) - First commit of Tasks

Simple commit of the management and two sub class creation.
Showing with 177 additions and 0 deletions
+177 -0
<?php
/*
This code is part of FusionDirectory (http://www.fusiondirectory.org/)
Copyright (C) 2012-2022 FusionDirectory
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
*/
class tasks extends simplePlugin
{
protected $displayHeader = FALSE;
static function plInfo (): array
{
return [
'plShortName' => _('Tasks'),
'plDescription' => _('Tasks'),
'plObjectClass' => ['fdTasks'],
'plFilter' => '(objectClass=fdTasks)',
'plPriority' => 41,
'plObjectType' => ['tasks' => [
'name' => _('Tasks'),
'ou' => get_ou('tasksRDN'),
'icon' => 'geticon.php?context=applications&icon=dsa&size=16',
]],
'plProvidedAcls' => parent::generatePlProvidedAcls(static::getAttributesInfo())
];
}
static function getAttributesInfo (): array
{
return [
// Attributes are grouped by section
'tasks' => [
'name' => _('Tasks Generic'),
'attrs' => [
new StringAttribute(
_('Task Name'), _('Mail Template Name'),
'cn', TRUE
),
]
],
];
}
function __construct ($dn = NULL, $object = NULL, $parent = NULL, $mainTab = FALSE)
{
global $config;
parent::__construct($dn, $object, $parent, $mainTab);
}
}
<?php
/*
This code is part of FusionDirectory (http://www.fusiondirectory.org)
Copyright (C) 2018-2022 FusionDirectory
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
class tasksMail extends simplePlugin
{
protected $displayHeader = TRUE;
static function plInfo (): array
{
return [
'plShortName' => _('Tasks Mail'),
'plDescription' => _('Tasks Mail Object'),
'plIcon' => 'geticon.php?context=applications&icon=supann&size=48',
'plSmallIcon' => 'geticon.php?context=applications&icon=supann-status&size=16',
'plPriority' => 42,
'plObjectClass' => ['fdTasksMail'],
'plFilter' => '(objectClass=fdTasksMail)',
'plObjectType' => ['tasks'],
'plConflicts' => [''],
'plProvidedAcls' => parent::generatePlProvidedAcls(static::getAttributesInfo())
];
}
static function getAttributesInfo (): array
{
return [
// Attributes are grouped by section
'taskMail' => [
'name' => _('Task Mail Object'),
'attrs' => [
new StringAttribute(
_('Task Mail Template Name'), _('Mail Template Name'),
'cn', TRUE
),
]
],
];
}
function __construct ($dn = NULL, $object = NULL, $parent = NULL, $mainTab = FALSE)
{
global $config;
parent::__construct($dn, $object, $parent, $mainTab);
}
}
<?php
/*
This code is part of FusionDirectory (http://www.fusiondirectory.org/)
Copyright (C) 2011-2022 FusionDirectory
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
*/
class tasksManagement extends management
{
/* Default columns */
public static $columns = [
['ObjectTypeColumn', []],
['LinkColumn', ['attributes' => 'cn', 'label' => 'Tasks']],
['ActionsColumn', ['label' => 'Actions']],
];
static function plInfo ()
{
return [
'plShortName' => _('Tasks'),
'plDescription' => _('Provide a mechanism to create and manage tasks'),
'plTitle' => _('Tasks'),
'plIcon' => 'geticon.php?context=applications&icon=argonaut&size=48',
'plSection' => 'conf',
'plPriority' => 40,
'plManages' => ['tasks'],
'plProvidedAcls' => [],
];
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment