FusionDirectory
interface_SimpleTab.inc
Go to the documentation of this file.
1 <?php
2 /*
3  This code is part of FusionDirectory (http://www.fusiondirectory.org/)
4 
5  Copyright (C) 2018-2020 FusionDirectory
6 
7  This program is free software; you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation; either version 2 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
20 */
21 
39 {
40  /*
41  * Public methods needed in some cases:
42  * compute_dn (): string (only for main tab)
43  * move (string $src_dn, string $dst_dn): TRUE|string (only for main tab)
44  * getAclBase (): string (only for main tab)
45  */
46 
47  public static function plInfo (): array;
48 
51  public function check (): array;
52 
55  public function remove (bool $fulldelete = FALSE): array;
56 
59  public function save (): array;
60 
63  public function resetCopyInfos ();
64 
67  public function set_acl_category (string $category);
68 
76  public function acl_is_removeable (string $base = NULL): bool;
77 
83  public function setTemplate (bool $isTemplate);
84 
90  public function setNeedEditMode (bool $needEditMode);
91 
95  public function is_modal_dialog (): bool;
96 
102  public function getRequiredAttributes (): array;
103 
107  public function showInTemplate (string $attr, array $templateAttrs): bool;
108 
113  public function attrIsReadable ($attr): bool;
114 
119  public function attrIsWriteable ($attr): bool;
120 
124  public function adapt_from_template (array $attrs, array $skip = []);
125 
131  public function deserializeValues (array $values, bool $checkAcl = TRUE);
132 
138  public function aclHasPermissions (): bool;
139 
143  public function aclGetPermissions ($attribute = '0', string $base = NULL, bool $skipWrite = FALSE): string;
144 
150  public function mergeObjectClasses (array $oc): array;
151 
157  public function fillHookAttrs (array &$addAttrs);
158 
162  public function isActive (): bool;
163 
167  public function isActivatable (): bool;
168 }
fillHookAttrs(array &$addAttrs)
Fill attributes which may be used in hooks.
isActive()
Test whether a tab is active.
attrIsWriteable($attr)
Check if logged in user have enough right to write this attribute value.
deserializeValues(array $values, bool $checkAcl=TRUE)
Deserialize values.
This interface should be implemented by all dialog classes in FusionDirectory.
setNeedEditMode(bool $needEditMode)
Sets whether the opened objet has an edit button.
save()
Save data to the LDAP and return errors.
acl_is_removeable(string $base=NULL)
Can we delete the object.
aclGetPermissions($attribute='0', string $base=NULL, bool $skipWrite=FALSE)
Get the acl permissions for an attribute or the plugin itself.
adapt_from_template(array $attrs, array $skip=[])
Adapt from template.
aclHasPermissions()
Test if the plugins have ACLs declared.
showInTemplate(string $attr, array $templateAttrs)
Returns TRUE if this attribute should be asked in the creation by template dialog.
check()
Checks data and return errors.
mergeObjectClasses(array $oc)
Merge in objectClasses needed by this tab.
getRequiredAttributes()
Returns list of required LDAP attributes.
set_acl_category(string $category)
Sets ACL category provided by simpleTabs.
isActivatable()
Test whether a tab can be deactivated.
resetCopyInfos()
Reset information after a copy/paste.
is_modal_dialog()
Is there a modal dialog opened.
setTemplate(bool $isTemplate)
Sets whether the opened objet is a template.
attrIsReadable($attr)
Check if logged in user have enough right to read this attribute value.