Add custom panel.

@param  Bar\PanelInterface $panel
@param  string             $id

@return static
195106
public function addPanel(Bar\PanelInterface $panel, string $id = null): self
    {
        if ($id === null) {
            $c = 0;
            do {
                $id = \get_class($panel) . ($c++ ? "-$c" : '');
            } while (isset($this->panels[$id]));
        }
        $this->panels[$id] = $panel;

        return $this;
    }
898984
public function add($id, QueryBuilder $connection)
    {
        if (isset($this->connections[$id])) {
            throw new InvalidArgumentException('A connection with the ID "'.$id.'" already exists.');
        }

        $this->connections[$id] = $connection;
        $this->default = false;

        return $this;
    }
862746
public function add_panel( $args ) {
		global $wp_customize;

		if ( ! isset( $args['type'] ) || ! array_key_exists( $args['type'], $this->panel_types ) ) {
			$args['type'] = 'default';
		}
		$panel_classname = $this->panel_types[ $args['type'] ];

		$wp_customize->add_panel( new $panel_classname( $wp_customize, $args['id'], $args ) );
	}
893147
public function add($id, $actionClass, array $options = array())
    {
        $this->actions[$id] = array(
            'class' => $actionClass,
            'options' => $options,
        );

        return $this;
    }
710578
public function addPage(PageInterface $page)
    {
        $this->items[$page->path()] = ['slug' => $page->slug()];

        return $this;
    }
1101213
public function htmlPanel($identifier, $content=NULL, $header=NULL, $footer=NULL) {
		return $this->addHtmlComponent(new HtmlPanel($identifier, $content, $header, $footer));
	}
321523
protected function buildBlock($id)
    {
        $blockType = $this->rawLayout->getProperty($id, RawLayout::BLOCK_TYPE, true);
        $options   = $this->rawLayout->getProperty($id, RawLayout::OPTIONS, true);
        $types     = $this->typeHelper->getTypes($blockType);

        $this->setBlockResolvedOptions($id, $blockType, $options, $types);
    }
282126
public function addWidget($id)
    {
        if (!(int)$id) return $this;
        $this->widgets[] = $this->application->getWidget( (int)$id );
        return $this;  
    }
524509
public function orderFields(array $ids, PanelFacet $panel)
    {
        $fields = $panel->getFieldsFacet();

        foreach ($fields as $field) {
            foreach($ids as $key => $id) {
                if ($id === $field->getId()) {
                    $field->setPosition($key);
                    $this->om->persist($field);
                }
            }
        }

        $this->om->flush();
    }
331236
public function editAction( $id = null ) {
		$request = $this->getRequest();

		$pageId      = $request->get( 'pageId' );
		$formFieldId = $request->get( 'formFieldId' );
		$uniqId      = $request->get( 'uniqId' );
		$code        = $request->get( 'code', 'networking_init_cms.admin.page' );


		$layoutBlock = $this->admin->getObject( $id );

		/** @var $form \Symfony\Component\Form\Form */
		$form = $this->admin->getForm();
		$form->setData( $layoutBlock );

		$form->handleRequest( $request );
		$response = null;

		if ( $form->isSubmitted() ) {
			if ( $form->isValid() ) {
				$this->admin->update( $layoutBlock );
				$html   = $this->getLayoutBlockFormWidget( $pageId, $formFieldId, $uniqId, $code );
				$status = 200;

				return new Response( $html, $status );
			} else {
				$this->error = true;

				$response = new Response();
				$response->setStatusCode( 500 );
			}

		}

		$view = $form->createView();

		// set the theme for the current Admin Form
		$this->get( 'twig' )->getRuntime( FormRenderer::class )->setTheme( $view, $this->admin->getFormTheme() );

		return $this->renderWithExtraParams(
			'@NetworkingInitCms/PageAdmin/layout_block_edit.html.twig',
			[
				'action' => 'create',
				'form'   => $view,
				'object' => $layoutBlock,
			],
			$response
		);
	}
278668
public function addCommentAction($id, Request $request = null)
    {
        $action = $this->container->get(CreateCommentAction::class);

        return $action($this->resolveRequest($request), $id);
    }
809710
public static function panel($panel_type = 'default', $tags = null)
    {
        $tag = self::tag('div', $tags, 'panel panel-'.$panel_type, '', array());
        return $tag;

    }
137406
public function add(string $id): self
    {
        $app = App::get();
        if (\BearFramework\Addons::exists($id)) {
            $app->addons->add($id);
            if (isset(Internal\Data\Addons::$registrations[$id])) {
                $addon = new \BearCMS\Addons\Addon($id);
                call_user_func(Internal\Data\Addons::$registrations[$id], $addon);
                if (is_callable($addon->initialize)) {
                    call_user_func($addon->initialize);
                }
            }
        }
        return $this;
    }
1285660
public function add(ElementInterface $element)
    {
        if ($element instanceof File) {
            $this->setAttribute('enctype', 'multipart/form-data');
        }
        return parent::add($element);
    }
424932
final public function alias($id, $referencedId)
    {
        $ref = static::processValue($referencedId, true);
        $alias = new Alias((string) $ref, $this->defaults->isPublic());
        $this->container->setAlias($id, $alias);

        return new AliasConfigurator($this, $alias);
    }
561742
public static function add_panel( $id = '', $args = [] ) {
		$args['id'] = $id;
		if ( ! isset( $args['description'] ) ) {
			$args['description'] = '';
		}
		if ( ! isset( $args['priority'] ) ) {
			$args['priority'] = 10;
		}
		if ( ! isset( $args['type'] ) ) {
			$args['type'] = 'default';
		}
		if ( false === strpos( $args['type'], 'kirki-' ) ) {
			$args['type'] = 'kirki-' . $args['type'];
		}
		self::$panels[ $id ] = $args;
	}
1289226
public function addWidget(WidgetInterface $widget)
    {
        if ($this->hasWidget($widget)) {
            throw new \InvalidArgumentException(sprintf('Widget "%s" is already registered.', $widget->getName()));
        }

        $this->widgets[$widget->getName()] = $widget;

        return $this;
    }