LABEL_CREATE_ANOTHER_ACCOUNT = _('Create another alias'); $this->LABEL_BACK_TO_ACCOUNT_LIST = _('Back to alias list'); } /** * {@inheritDoc} */ public function getAlias(): string { return _("Mail aliases"); } /** * {@inheritDoc} */ public function getDescription(): string { return _("Mailing aliases (e.g. NIS mail aliases)"); } /** * {@inheritDoc} */ public function getIcon(): string { return 'mail.svg'; } /** * {@inheritDoc} */ public function getListClassName(): string { return lamMailAliasList::class; } /** * {@inheritDoc} */ public function getDefaultListAttributes(): string { return "#cn;#rfc822MailMember"; } /** * {@inheritDoc} */ public function getTitleBarTitle(accountContainer $container): ?string { // get attributes $attributes = null; if ($container->getAccountModule('nisMailAlias') != null) { $attributes = $container->getAccountModule('nisMailAlias')->getAttributes(); } // check if a common name is set if (isset($attributes['cn'][0])) { return htmlspecialchars($attributes['cn'][0]); } // new entry if ($container->isNewAccount) { return _("New alias"); } // fall back to default return parent::getTitleBarTitle($container); } } /** * Generates the list view. * * @package lists * @author Roland Gruber * */ class lamMailAliasList extends lamList { /** * Constructor * * @param ConfiguredType $type account type */ public function __construct(ConfiguredType $type) { parent::__construct($type); $this->labels = [ 'nav' => _("Alias count: %s"), 'error_noneFound' => _("No aliases found!"), 'newEntry' => _("New alias"), 'deleteEntry' => _("Delete selected aliases") ]; } }