Add child admin page.

@param string    $slug
@param array     $options
971690
public function addChild($slug, $options)
    {
        $identifier = $this->getModel()->getIdentifier();

        // Check slug
        if (empty($slug)) {
            throw new AdminPageException(Translate::t('adminpage.errors.slug_is_not_defined'));
        }

        // Set default option's values
        $defaults = [
            'slug'          => $slug,

            // Page options
            'title'         => Translate::t('adminpage.child.defaults.title'),
            'name'          => Translate::t('adminpage.child.defaults.name'),
            'description'   => '',
            'sections'      => [],

            // Options
            'capabilities'  => OL_ZEUS_WP_CAP,
            'adminbar'      => true,
            'submit'        => true,
        ];

        // Merge options
        $options = array_merge($defaults, $options);
        $this->getModel()->updatePage($slug, $options);

        $pageid = $slug === $identifier ? $identifier : $identifier.'-'.$slug;

        // Add child page
        add_submenu_page(
            $identifier,
            $options['title'],
            $options['name'],
            $options['capabilities'],
            $pageid,
            [&$this, 'callback']
        );

        // Add admin bar menu
        if ($options['adminbar']) {
            $this->addChildAdminBar($slug, $options);
        }
    }
274903
private function addPage(array $options = array())
    {
        // Add new page to the document
        if (strtoupper($options['size'] = 'LETTER') && strtoupper($options['orientation']) == 'LANDSCAPE') {
            $this->_page = $this->_pdf->newPage(ZfPdf\Page::SIZE_LETTER_LANDSCAPE);
        } elseif (strtoupper($options['size'] = 'LETTER') && strtoupper($options['orientation']) != 'LANDSCAPE') {
            $this->_page = $this->_pdf->newPage(ZfPdf\Page::SIZE_LETTER);
        } elseif (strtoupper($options['size'] != 'A4') && strtoupper($options['orientation']) == 'LANDSCAPE') {
            $this->_page = $this->_pdf->newPage(ZfPdf\Page::SIZE_A4_LANDSCAPE);
        } else {
            $this->_page = $this->_pdf->newPage(ZfPdf\Page::SIZE_A4);
        }

        $this->_page->setStyle($this->_style);
        $this->_pdf->pages[] = $this->_page;
        $this->_page->setFont($this->_font, 14);

        return $this;
    }
848156
public function addRootPage()
    {
        $identifier = $this->getModel()->getIdentifier();

        // Check page
        if (!$this->getModel()->hasPage($identifier)) {
            throw new AdminPageException(sprintf(Translate::t('adminpage.errors.page_is_empty'), $identifier));
        }

        // Set default option's values
        $defaults = [
            'slug'          => $identifier,

            // Page options
            'title'         => Translate::t('adminpage.root.defaults.title'),
            'name'          => Translate::t('adminpage.root.defaults.name'),
            'icon'          => 'dashicons-admin-generic',
            'description'   => '',
            'position'      => 80,
            'sections'      => [],

            // Options
            'capabilities'  => OL_ZEUS_WP_CAP,
            'adminbar'      => true,
            'submit'        => true,
        ];

        // Update pages
        $options = $this->getModel()->getPages($identifier);
        $options = array_merge($defaults, $options);
        $this->getModel()->updatePage($identifier, $options);

        // Add main page
        add_menu_page(
            $options['title'],
            $options['name'],
            $options['capabilities'],
            $identifier,
            [&$this, 'callback'],
            $options['icon'],
            $options['position']
        );

        // Add admin bar menu
        if ($options['adminbar']) {
            $this->addRootAdminBar();
        }
    }
873360
public function partial($slug, $data = [])
    {
        $data = $this->add_default_data($data);

        // Check if this is being run outside of a view context.
        if ($this->current_view === null) {
            echo $this->blade->run('partials.' . $this->bladeify($slug), $data);
            return;
        }

        echo $this->blade->runChild('partials.' . $this->bladeify($slug), $data);
    }
470977
public function init($options=[], $context=null)
    {
        $this->url=$options['url']??static::SG()->_SERVER['REQUEST_URI'];
        $this->key=$options['key']??$this->key;
        $this->page_size=$options['page_size']??$this->page_size;
        
        $this->handel_get_url=$options['rewrite']??$this->handel_get_url;
        
        $this->current_page=$options['current']??intval(static::SG()->_GET[$this->key]??1);
        $this->current_page=$this->current_page>1?$this->current_page:1;
    }
299701
public static function add($path, $options) {
		if (Reveal::is('Sapi.cli')) {
			return;
		}

		if (!empty($options['access'])) {
			foreach ((array) $options['access'] as $rule) {
				$check = strpos($rule, '!') === 0;
				if ($check) {
					$rule = substr($rule, 1);
				}
				if (Reveal::is($rule) == $check) {
					return;
				}
			}
			unset($options['access']);
		}

		$pathE = explode('.', $path);
		$pathE = array_splice($pathE, 0, count($pathE) - 2);
		$parent = join('.', $pathE);
		if (!empty($parent) && !Hash::check(self::$_items, $parent)) {
			$title = Inflector::humanize(end($pathE));
			$o = array('title' => $title);
			self::_setupOptions($o);
			self::add($parent, $o);
		}
		self::_setupOptions($options);
		$current = Hash::extract(self::$_items, $path);
		if (!empty($current)) {
			self::_replace(self::$_items, $path, $options);
		} else {
			self::$_items = Hash::insert(self::$_items, $path, $options);
		}
	}
1219868
public function addToDropDown(array $options)
    {
        foreach ($this->sizes as $slug => $props) {
            if ($props['label'] && ! isset($options[$slug])) {
                $options[$slug] = $props['label'];
            }
        }

        return $options;
    }
413818
private function setup_pages() {

		$args                 = array(
			'capability' => 'manage_options',
			'icon'       => null,
			'position'   => null,
		);
		$this->struct['args'] = array_merge( $args, $this->struct );

		if ( ! isset( $this->struct['parent'] ) ) {
			add_action( 'admin_menu', array( $this, 'add_settings_page' ), 9 );
		} else {
			add_action( 'admin_menu', array( $this, 'add_sub_page' ), 9 );
		}

	}
335335
protected function page($slug)
    {
        $page = Content::page()->publish()->where('slug', '=', $slug)->firstOrFail();
        $slug = preg_replace('/^_page_\//', '', $slug);

        if (! View::exists($view = "orchestra/story::pages.{$slug}")) {
            $view = 'orchestra/story::page';
        }

        return Facile::view($view)->with(['page' => $page])->render();
    }
260752
public function attachRoleBySlug($slug)
    {
        $role = Role::where('slug', $slug)->first();

        return $this->attachRole($role);
    }
705082
public function addPage(ChildPage $l)
    {
        if ($this->collPages === null) {
            $this->initPages();
            $this->collPagesPartial = true;
        }

        if (!$this->collPages->contains($l)) {
            $this->doAddPage($l);

            if ($this->pagesScheduledForDeletion and $this->pagesScheduledForDeletion->contains($l)) {
                $this->pagesScheduledForDeletion->remove($this->pagesScheduledForDeletion->search($l));
            }
        }

        return $this;
    }
953614
public function registerMenuPage($slug, $title, array $permissions, $link = null, $icon = null, $position = null)
    {
        if ($this->menuPageExists($slug)) {
            return false;
        }

        $slug = trim(Str::slug($slug));
        $title = trim($title);
        if ( ! is_array($permissions)) {
            $permissions = (array)$permissions;
        }
        $link = trim($link);
        $position = (null === $position) ? 1500 : (int)$position;


        if ( ! empty($slug) && ! empty($title)) {
            $this->menuLinks[ $slug ] = [
                'title'       => $title,
                'permissions' => $permissions,
                'link'        => $link,
                'icon'        => $icon,
                'position'    => (int)$position,
            ];

            return $slug;
        }

        return false;
    }
1151929
private function sanitize_slug( &$slug ) {
		$slug = sanitize_key( $slug );
		if ( '' === $slug ) {
			$slug = count( $this->child );
		}
	}
303570
function admin_menu()
	{
		// add page
		$page = add_submenu_page('edit.php?post_type=acf', __('Add-ons','acf'), __('Add-ons','acf'), 'manage_options', 'acf-addons', array($this,'html'));
		
		
		// actions
		add_action('load-' . $page, array($this,'load'));
		add_action('admin_print_scripts-' . $page, array($this, 'admin_print_scripts'));
		add_action('admin_print_styles-' . $page, array($this, 'admin_print_styles'));
		add_action('admin_head-' . $page, array($this,'admin_head'));
	}
1216765
public function addHeader($name, $options)
    {
        $header = new Header($name, $options);
        $header->setTable($this);
        $this->headersObjects[$name] = $header;
    }
753797
public function addOptions(array $options)
    {
        if ($options) {
            foreach ($this->routes as $route) {
                $route->addOptions($options);
            }
        }
    }
1325710
public function addModule($module, array $options = NULL) {
		$this->add_to_list($module, new $module($this->server, $this, $options));
    }