Add 'Inbox' to profile menu.

@since 2.0.0
@access public
773869
public function ProfileController_AddProfileTabs_Handler($Sender) {
      if (Gdn::Session()->IsValid()) {
         $Inbox = T('Inbox');
         $InboxHtml = Sprite('SpInbox').' '.$Inbox;
         $InboxLink = '/messages/all';
         
         if (Gdn::Session()->UserID != $Sender->User->UserID) {
            // Accomodate admin access
            if (C('Conversations.Moderation.Allow', FALSE) && Gdn::Session()->CheckPermission('Conversations.Moderation.Manage')) {
               $CountUnread = $Sender->User->CountUnreadConversations;
               $InboxLink .= "?userid={$Sender->User->UserID}";
            } else {
               return;
            }
         } else {
            // Current user
            $CountUnread = Gdn::Session()->User->CountUnreadConversations;
         }
         
         if (is_numeric($CountUnread) && $CountUnread > 0)
            $InboxHtml .= ' <span class="Aside"><span class="Count">'.$CountUnread.'</span></span>';
         $Sender->AddProfileTab($Inbox, $InboxLink, 'Inbox', $InboxHtml);
      }
   }
799997
public function setupMetaBoxSupport()
    {
        do_action('add_meta_boxes_' . $this->screenHook, null);
        do_action('add_meta_boxes', $this->screenHook, null);

        add_screen_option('layout_columns', array('max' => 2, 'default' => 2));
    }
546851
public function createAction()
    {
        if ($this->request->isPost()) {

            $profile = new Profiles([
                'name' => $this->request->getPost('name', 'striptags'),
                'active' => $this->request->getPost('active')
            ]);

            if (!$profile->save()) {
                $this->flash->error($profile->getMessages());
            } else {
                $this->flash->success("Profile was created successfully");
            }

            Tag::resetInput();
        }

        $this->view->form = new ProfilesForm(null);
    }
1050291
function init()
    {
        $this->rc = rcmail::get_instance();

        // Preferences hooks
        if ($this->rc->task == 'settings') {
            $this->add_hook('preferences_list', array($this, 'prefs_list'));
            $this->add_hook('preferences_save', array($this, 'prefs_save'));
        }
        else { // if ($this->rc->task == 'mail') {
            // add script when not in ajax and not in frame and only in main window
            if ($this->rc->output->type == 'html' && empty($_REQUEST['_framed']) && $this->rc->action == '') {
                $this->add_texts('localization/');
                $this->rc->output->add_label('newmail_notifier.title', 'newmail_notifier.body');
                $this->include_script('newmail_notifier.js');
            }

            if ($this->rc->action == 'refresh') {
                // Load configuration
                $this->load_config();

                $this->opt['basic']   = $this->rc->config->get('newmail_notifier_basic');
                $this->opt['sound']   = $this->rc->config->get('newmail_notifier_sound');
                $this->opt['desktop'] = $this->rc->config->get('newmail_notifier_desktop');

                if (!empty($this->opt)) {
                    // Get folders to skip checking for
                    $exceptions = array('drafts_mbox', 'sent_mbox', 'trash_mbox');
                    foreach ($exceptions as $folder) {
                        $folder = $this->rc->config->get($folder);
                        if (strlen($folder) && $folder != 'INBOX') {
                            $this->exceptions[] = $folder;
                        }
                    }

                    $this->add_hook('new_messages', array($this, 'notify'));
                }
             }
        }
    }
481163
protected function addToolbar()
	{
		$extension = JFactory::getApplication()->input->get('extension');
		$user = JFactory::getUser();
		$userId = $user->id;

		$isNew = ($this->item->id == 0);
		$checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $userId);

        // Check to see if the type exists
        //$ucmType = new ContentTableUcmType;
        //$this->typeId = $ucmType->getTypeId($extension . '.category');

		// Avoid nonsense situation.
		if ($extension == 'com_categories')
		{
			return;
		}

		// The extension can be in the form com_foo.section
		$parts = explode('.', $extension);
		$component = $parts[0];
		$section = (count($parts) > 1) ? $parts[1] : null;
		$componentParams = JComponentHelper::getParams($component);

		// Need to load the menu language file as mod_menu hasn't been loaded yet.
		$lang = JFactory::getLanguage();
		$lang->load($component, JPATH_BASE, null, false, true)
		|| $lang->load($component, JPATH_ADMINISTRATOR . '/components/' . $component, null, false, true);

		// Load the category helper.
		JLoader::register('CategoriesHelper', JPATH_ADMINISTRATOR . '/components/com_categories/helpers/categories.php');

		// Get the results for each action.
		$canDo = $this->canDo;

		// If a component categories title string is present, let's use it.
		if ($lang->hasKey($component_title_key = $component . ($section ? "_$section" : '') . '_CATEGORY_' . ($isNew ? 'ADD' : 'EDIT') . '_TITLE'))
		{
			$title = JText::_($component_title_key);
		}
		// Else if the component section string exits, let's use it
		elseif ($lang->hasKey($component_section_key = $component . ($section ? "_$section" : '')))
		{
			$title = JText::sprintf('COM_CATEGORIES_CATEGORY_' . ($isNew ? 'ADD' : 'EDIT')
					. '_TITLE', $this->escape(JText::_($component_section_key))
					);
		}
		// Else use the base title
		else
		{
			$title = JText::_('COM_CATEGORIES_CATEGORY_BASE_' . ($isNew ? 'ADD' : 'EDIT') . '_TITLE');
		}

		// Load specific css component
		JHtml::_('stylesheet', $component . '/administrator/categories.css', array(), true);

		// Prepare the toolbar.
		JToolbarHelper::title(
			$title,
			'folder category-' . ($isNew ? 'add' : 'edit')
				. ' ' . substr($component, 4) . ($section ? "-$section" : '') . '-category-' . ($isNew ? 'add' : 'edit')
		);

		// For new records, check the create permission.
		if ($isNew && (count($user->getAuthorisedCategories($component, 'core.create')) > 0))
		{
			JToolbarHelper::apply('category.apply');
			JToolbarHelper::save('category.save');
			JToolbarHelper::save2new('category.save2new');
			JToolbarHelper::cancel('category.cancel');
		}

		// If not checked out, can save the item.
		else
		{
			// Since it's an existing record, check the edit permission, or fall back to edit own if the owner.
			$itemEditable = $canDo->get('core.edit') || ($canDo->get('core.edit.own') && $this->item->created_user_id == $userId);

			// Can't save the record if it's checked out and editable
			if (!$checkedOut && $itemEditable)
			{
				JToolbarHelper::apply('category.apply');
				JToolbarHelper::save('category.save');

				if ($canDo->get('core.create'))
				{
					JToolbarHelper::save2new('category.save2new');
				}
			}

			// If an existing item, can save to a copy.
			if ($canDo->get('core.create'))
			{
				JToolbarHelper::save2copy('category.save2copy');
			}

			JToolbarHelper::cancel('category.cancel', 'JTOOLBAR_CLOSE');
		}

		JToolbarHelper::divider();

		// Compute the ref_key
		$ref_key = strtoupper($component . ($section ? "_$section" : '')) . '_CATEGORY_' . ($isNew ? 'ADD' : 'EDIT') . '_HELP_KEY';

		// Check if thr computed ref_key does exist in the component
		if (!$lang->hasKey($ref_key))
		{
			$ref_key = 'JHELP_COMPONENTS_'
						. strtoupper(substr($component, 4) . ($section ? "_$section" : ''))
						. '_CATEGORY_' . ($isNew ? 'ADD' : 'EDIT');
		}

		/*
		 * Get help for the category/section view for the component by
		 * -remotely searching in a language defined dedicated URL: *component*_HELP_URL
		 * -locally  searching in a component help file if helpURL param exists in the component and is set to ''
		 * -remotely searching in a component URL if helpURL param exists in the component and is NOT set to ''
		 */
		if ($lang->hasKey($lang_help_url = strtoupper($component) . '_HELP_URL'))
		{
			$debug = $lang->setDebug(false);
			$url = JText::_($lang_help_url);
			$lang->setDebug($debug);
		}
		else
		{
			$url = null;
		}

		JToolbarHelper::help($ref_key, $componentParams->exists('helpURL'), $url, $component);
	}
1118858
private function AddMenuAccessField()
    {
        $name = 'MenuAccess';
        $value = $this->page->Exists() ? $this->page->GetMenuAccess() : (string)MenuAccess::Authorized();
        $select = new Select($name, $value);
        foreach (MenuAccess::AllowedValues() as $access)
        {
            $select->AddOption($access, Trans("Core.PageForm.$name.$access"));
        }
        $this->AddField($select);
        $this->SetRequired($name);
    }
69904
public function updateProfile()
    {
        if ($this->v["uID"] > 0) {
            // $GLOBALS["SL"]->user() returns an instance of the authenticated user...
            if ($this->v["uID"] == $GLOBALS["SL"]->REQ->uID || $this->v["user"]->hasRole('administrator')) {
                $user = User::find($GLOBALS["SL"]->REQ->uID);
                $user->name = $GLOBALS["SL"]->REQ->name;
                $user->email = $GLOBALS["SL"]->REQ->email;
                $user->save();
                $user->loadRoles();
                if ($this->v["user"]->hasRole('administrator')) {
                    if ($GLOBALS["SL"]->REQ->has('roles') && is_array($GLOBALS["SL"]->REQ->roles)
                        && sizeof($GLOBALS["SL"]->REQ->roles) > 0) {
                        foreach ($user->roles as $i => $role) {
                            if (in_array($role->DefID, $GLOBALS["SL"]->REQ->roles)) {
                                if (!$user->hasRole($role->DefSubset)) {
                                    $user->assignRole($role->DefSubset);
                                }
                            } elseif ($user->hasRole($role->DefSubset)) {
                                $user->revokeRole($role->DefSubset);
                            }
                        }
                    } else { // no roles selected, delete all that exist
                        foreach ($user->roles as $i => $role) {
                            if ($user->hasRole($role->DefSubset)) {
                                $user->revokeRole($role->DefSubset);
                            }
                        }
                    }
                }
                $this->redir('/profile/' . urlencode($user->name), true);
                return true;
            }
        }
        return false;
    }
484755
def add_profile(self, profile, selected):
        """"""
        report = Report(profile)
        report.selected = selected
        if selected:
            self.report['settings']['selected_profiles'].append(report.name)
            self.report['settings']['selected_profile_count'] += 1
        self.report['settings']['total_profile_count'] += 1
        self.profiles.setdefault(report.name, report)
        return report
1359946
public function emailAction()
    {
        $model   = $this->getModel();

        $model->setFilter($this->getSearchFilter(false));

        $sort = array(
            'gr2o_email'          => SORT_ASC,
            'grs_first_name'     => SORT_ASC,
            'grs_surname_prefix' => SORT_ASC,
            'grs_last_name'      => SORT_ASC,
            'gto_valid_from'     => SORT_ASC,
            'gto_round_order'    => SORT_ASC,
            'gsu_survey_name'    => SORT_ASC,
        );

        if ($tokensData = $model->load(true, $sort)) {
            $params['mailTarget']           = 'token';
            $params['menu']                 = $this->menu;
            $params['model']                = $model;
            $params['identifier']           = $this->_getIdParam();
            $params['view']                 = $this->view;
            $params['routeAction']          = 'index';
            $params['formTitle']            = sprintf($this->_('Send mail to: %s'), $this->getTopic());
            $params['templateOnly']         = ! $this->currentUser->hasPrivilege('pr.token.mail.freetext');
            $params['multipleTokenData']    = $tokensData;

            $this->addSnippet('Mail_TokenBulkMailFormSnippet', $params);
        } else {
            $this->addMessage($this->_('No tokens found.'));
        }
    }
199890
public function AddCategory() {
      // Check permission
      $this->Permission('Garden.Settings.Manage');
      
      // Set up head
      $this->AddJsFile('jquery.alphanumeric.js');
      $this->AddJsFile('categories.js');
      $this->AddJsFile('jquery.gardencheckboxgrid.js');
      $this->Title(T('Add Category'));
      $this->AddSideMenu('vanilla/settings/managecategories');
      
      // Prep models
      $RoleModel = new RoleModel();
      $PermissionModel = Gdn::PermissionModel();
      $this->Form->SetModel($this->CategoryModel);
      
      // Load all roles with editable permissions.
      $this->RoleArray = $RoleModel->GetArray();
      
      $this->FireEvent('AddEditCategory');
      
      if ($this->Form->IsPostBack() == FALSE) {
         $this->Form->AddHidden('CodeIsDefined', '0');
      } else {
         // Form was validly submitted
         $IsParent = $this->Form->GetFormValue('IsParent', '0');
         $this->Form->SetFormValue('AllowDiscussions', $IsParent == '1' ? '0' : '1');
         $this->Form->SetFormValue('CustomPoints', (bool)$this->Form->GetFormValue('CustomPoints'));
         $CategoryID = $this->Form->Save();
         if ($CategoryID) {
            $Category = CategoryModel::Categories($CategoryID);
            $this->SetData('Category', $Category);
            
            if ($this->DeliveryType() == DELIVERY_TYPE_ALL)
               Redirect('vanilla/settings/managecategories');
         } else {
            unset($CategoryID);
         }
      }
      // Get all of the currently selected role/permission combinations for this junction.
      $Permissions = $PermissionModel->GetJunctionPermissions(array('JunctionID' => isset($CategoryID) ? $CategoryID : 0), 'Category');
      $Permissions = $PermissionModel->UnpivotPermissions($Permissions, TRUE);
   
      if ($this->DeliveryType() == DELIVERY_TYPE_ALL) {
         $this->SetData('PermissionData', $Permissions, TRUE);
      }
      
      // Render default view
      $this->Render();      
   }
1337624
protected function addToolbar()
	{
		$categoryId = $this->state->get('filter.category_id');
		$component  = $this->state->get('filter.component');
		$section    = $this->state->get('filter.section');
		$canDo      = JHelperContent::getActions($component, 'category', $categoryId);
		$user       = JFactory::getUser();
		$extension  = JFactory::getApplication()->input->get('extension', '', 'word');

		// Get the toolbar object instance
		$bar = JToolbar::getInstance('toolbar');

		// Avoid nonsense situation.
		if ($component == 'com_categories')
		{
			return;
		}

		// Need to load the menu language file as mod_menu hasn't been loaded yet.
		$lang = JFactory::getLanguage();
		$lang->load($component, JPATH_BASE, null, false, true)
		|| $lang->load($component, JPATH_ADMINISTRATOR . '/components/' . $component, null, false, true);

		// Load the category helper.
		JLoader::register('CategoriesHelper', JPATH_ADMINISTRATOR . '/components/com_categories/helpers/categories.php');

		// If a component categories title string is present, let's use it.
		if ($lang->hasKey($component_title_key = strtoupper($component . ($section ? "_$section" : '')) . '_CATEGORIES_TITLE'))
		{
			$title = JText::_($component_title_key);
		}
		elseif ($lang->hasKey($component_section_key = strtoupper($component . ($section ? "_$section" : ''))))
		// Else if the component section string exits, let's use it
		{
			$title = JText::sprintf('COM_CATEGORIES_CATEGORIES_TITLE', $this->escape(JText::_($component_section_key)));
		}
		else
		// Else use the base title
		{
			$title = JText::_('COM_CATEGORIES_CATEGORIES_BASE_TITLE');
		}

		// Load specific css component
		JHtml::_('stylesheet', $component . '/administrator/categories.css', array(), true);

		// Prepare the toolbar.
		JToolbarHelper::title($title, 'folder categories ' . substr($component, 4) . ($section ? "-$section" : '') . '-categories');

		if ($canDo->get('core.create') || (count($user->getAuthorisedCategories($component, 'core.create'))) > 0)
		{
			JToolbarHelper::addNew('category.add');
		}

		if ($canDo->get('core.edit') || $canDo->get('core.edit.own'))
		{
			JToolbarHelper::editList('category.edit');
		}

		if ($canDo->get('core.edit.state'))
		{
			JToolbarHelper::publish('categories.publish', 'JTOOLBAR_PUBLISH', true);
			JToolbarHelper::unpublish('categories.unpublish', 'JTOOLBAR_UNPUBLISH', true);
			JToolbarHelper::archiveList('categories.archive');
		}

		if (JFactory::getUser()->authorise('core.admin'))
		{
			JToolbarHelper::checkin('categories.checkin');
		}

		// Add a batch button
		if ($user->authorise('core.create', $extension)
			&& $user->authorise('core.edit', $extension)
			&& $user->authorise('core.edit.state', $extension))
		{
			$title = JText::_('JTOOLBAR_BATCH');

			// Instantiate a new JLayoutFile instance and render the batch button
			$layout = new JLayoutFile('joomla.toolbar.batch');

			$dhtml = $layout->render(array('title' => $title));
			$bar->appendButton('Custom', $dhtml, 'batch');
		}

		if ($canDo->get('core.admin'))
		{
			JToolbarHelper::custom('categories.rebuild', 'refresh.png', 'refresh_f2.png', 'JTOOLBAR_REBUILD', false);
		}

		if ($canDo->get('core.admin') || $canDo->get('core.options'))
		{
			JToolbarHelper::preferences($component);
		}

		if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete', $component))
		{
			JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE', 'categories.delete', 'JTOOLBAR_EMPTY_TRASH');
		}
		elseif ($canDo->get('core.edit.state'))
		{
			JToolbarHelper::trash('categories.trash');
		}

		// Compute the ref_key if it does exist in the component
		if (!$lang->hasKey($ref_key = strtoupper($component . ($section ? "_$section" : '')) . '_CATEGORIES_HELP_KEY'))
		{
			$ref_key = 'JHELP_COMPONENTS_' . strtoupper(substr($component, 4) . ($section ? "_$section" : '')) . '_CATEGORIES';
		}

		/*
		 * Get help for the categories view for the component by
		 * -remotely searching in a language defined dedicated URL: *component*_HELP_URL
		 * -locally  searching in a component help file if helpURL param exists in the component and is set to ''
		 * -remotely searching in a component URL if helpURL param exists in the component and is NOT set to ''
		 */
		if ($lang->hasKey($lang_help_url = strtoupper($component) . '_HELP_URL'))
		{
			$debug = $lang->setDebug(false);
			$url = JText::_($lang_help_url);
			$lang->setDebug($debug);
		}
		else
		{
			$url = null;
		}

		JToolbarHelper::help($ref_key, JComponentHelper::getParams($component)->exists('helpURL'), $url);
	}
751896
public function updateAccountMenu($menu)
    {
        $curr_action = $this
            ->owner
            ->getRequest()
            ->param("Action");

        $menu->add(ArrayData::create([
            "ID"    => 11,
            "Title" => _t('SilverCommerce\ContactAdmin.Addresses', 'Addresses'),
            "Link"  => $this->getOwner()->Link("addresses"),
            "LinkingMode" => ($curr_action == "addresses") ? "current" : "link"
        ]));
    }
1018562
static function addMenu() {

		$url = get_admin_url( get_current_blog_id(), '/index.php?page=pb_catalog' );
		$view_url = static::viewCatalogUrl();
		$edit_url = $url . '&action=edit_profile';
		if ( isset( $_REQUEST['user_id'] ) ) {
			$edit_url .= '&user_id=' . $_REQUEST['user_id'];
		}

		$list_table = new static();
		$list_table->prepare_items();
		?>
		<div class="wrap">

			<h1><?php echo isset( $_REQUEST['user_id'] ) ? ucfirst( get_userdata( absint( $_REQUEST['user_id'] ) )->user_login ) : __( 'My Catalog', 'pressbooks' ); ?>
				<a href="<?php echo $edit_url; ?>" class=" page-title-action"><?php _e( 'Edit Profile', 'pressbooks' ); ?></a>
				<a href="<?php echo $view_url; ?>" class=" page-title-action"><?php _e( 'Visit Catalog', 'pressbooks' ); ?></a>
			</h1>

			<div class="postbox">
				<div class="inside">
					<h4><?php _e( 'Organize your public Catalog page.', 'pressbooks' ); ?></h4>
					<h5><span data-icon="a" class="show-hide-icon"></span><?php _e( 'Show/Hide books', 'pressbooks' ); ?></h5>
					<p><?php printf( __( 'To display a book in your catalog choose "%s" under Catalog Status. ', 'pressbooks' ), '<strong>' . __( 'Show in Catalog', 'pressbooks' ) . '</strong>' ); ?>
						<br>
						<?php printf( __( 'To hide a book in your catalog choose "%s" under Catalog Status.', 'pressbooks' ), '<strong>' . __( 'Hide in Catalog', 'pressbooks' ) . '</strong>' ); ?>
					</p>

					<h5><span data-icon="g" class="sort-icon"></span><?php _e( 'Catalog sorting', 'pressbooks' ); ?></h5>
					<p><?php printf( __( 'To add sorting ability, add your Tag names to your <a href="%s">Catalog Profile</a> page (ex: Authors, Book Genre), then add the appropriate tags to each individual book.', 'pressbooks' ), $edit_url ); ?></p>

					<h5><span data-icon="f" class="share-icon"></span><?php _e( 'Share your catalog', 'pressbooks' ); ?></h5>
					<p><?php _e( 'The public link to your catalog page', 'pressbooks' ); ?>: <a href="<?php echo $view_url; ?>"><?php echo $view_url; ?></a></p>
				</div>
			</div><!-- end .postbox -->

			<form id="books-search" method="get" action="<?php echo $url; ?>">
				<?php wp_nonce_field( 'pb_catalog_search', 'pb_catalog_search', false ); ?>
				<input type="hidden" name="page" value="<?php echo esc_attr( $_REQUEST['page'] ); ?>"/>
				<?php if ( ! empty( $_REQUEST['user_id'] ) ) : ?>
					<input type="hidden" name="user_id" value="<?php echo esc_attr( $_REQUEST['user_id'] ); ?>"/>
				<?php endif; ?>
				<?php $list_table->search_box( __( 'Search', 'pressbooks' ), 'search_id' ); ?>
			</form>

			<form id="books-filter" method="post" action="<?php echo $url; ?>">
				<input type="hidden" name="page" value="<?php echo esc_attr( $_REQUEST['page'] ); ?>"/>
				<?php if ( ! empty( $_REQUEST['user_id'] ) ) : ?>
					<input type="hidden" name="user_id" value="<?php echo esc_attr( $_REQUEST['user_id'] ); ?>"/>
				<?php endif; ?>
				<div id="add-by-url">
					<input type="text" id="add_book_by_url" name="add_book_by_url"/><label for="add_book_by_url">
						<input type="submit" name="" id="search-submit" class="button" value="<?php esc_attr_e( 'Add By URL', 'pressbooks' ); ?>">
					</label>
					&nbsp;
				</div>

				<?php $list_table->display(); ?>
			</form>

		</div>
		<?php

	}
151072
def add_logout_button_to_menu(menu, priority = 20, html_options = {})
      if logout_link_path
        html_options = html_options.reverse_merge(method: logout_link_method || :get)
        menu.add id: 'logout', priority: priority, html_options: html_options,
          label: -> { I18n.t 'active_admin.logout' },
          url:   -> { render_or_call_method_or_proc_on self, active_admin_namespace.logout_link_path },
          if:    :current_active_admin_user?
      end
    end
250332
private function add_menu_action() {
            if ( $this->is_activation_mode() ) {
                if ( $this->is_plugin() || ( $this->has_settings_menu() && ! $this->is_free_wp_org_theme() ) ) {
                    $this->override_plugin_menu_with_activation();
                } else {
                    /**
                     * Handle theme opt-in when the opt-in form shows as a dialog box in the themes page.
                     */
                    if ( fs_request_is_action( $this->get_unique_affix() . '_activate_existing' ) ) {
                        add_action( 'load-themes.php', array( &$this, '_install_with_current_user' ) );
                    } else if ( fs_request_is_action( $this->get_unique_affix() . '_activate_new' ) ||
                                fs_request_get_bool( 'pending_activation' )
                    ) {
                        add_action( 'load-themes.php', array( &$this, '_install_with_new_user' ) );
                    }
                }
            } else {
                if ( ! $this->is_registered() ) {
                    // If not registered try to install user.
                    if ( fs_request_is_action( $this->get_unique_affix() . '_activate_new' ) ) {
                        $this->_install_with_new_user();
                    }
                } else if (
                    fs_request_is_action( 'sync_user' ) &&
                    ( ! $this->has_settings_menu() || $this->is_free_wp_org_theme() )
                ) {
                    $this->_handle_account_user_sync();
                }
            }
        }
1347402
public function init()
    {
        parent::init();
        $this->setAttribute('id', 'jobsbymail-subscribe-form')
            ->setAttribute('method', 'POST');
        
        $this->add([
            'type' => 'email',
            'name' => 'email',
            'options' => [
                'label' => /*@translate*/ 'Email'
            ],
            'attributes' => [
                'required' => true,
                'placeholder' => /*@translate*/ 'Enter your email address'
            ]
        ]);
        
        $this->getInputFilter()->add([
            'name' => 'l',
            'required' => false
        ]);
    }
207356
public function add_menu() {
		if ( !isset( $this->page_id ) && !isset( $this->title ) && !isset( $this->name ) && !isset( $this->parent ) && !isset( $this->cap ) ) {
			return;
		}

		if ( $this->parent ) {	
			$this->screen_name = add_submenu_page( $this->parent, $this->title, $this->name, $this->cap, $this->page_id, array( &$this, 'render_page' ) );
		} else {
			$this->screen_name = add_menu_page( $this->title, $this->name, $this->cap, $this->page_id, array( &$this, 'render_page' ) );	
		}
	}