Add a section into this panel.

@param string $id   The Section object, or Section ID.
@param array  $args The section properties.

@return Section
975360
public function add_section( $id, $args = [] ) {
		$section = $this->manager->add_section( $id, $args );

		$section->panel = $this->id;

		return $section;
	}
462116
public function update($id, $args = [])
    {
        $theme = wp_get_theme($id);

        if (! $theme->exists()) {
            throw new UnexpectedValueException(sprintf('[W612] Could not find theme %s', $id));
        }

        switch_theme($theme->get_template());
    }
964308
public function handleCategoryId($args)
    {
        $productId = $args['row']['product_id'];
        $categoryId = $args['row']['category_id'];

        if (!array_key_exists($productId, $this->categoryIds)) {
            $this->categoryIds[$productId] = [];
        }
        $this->categoryIds[$productId][] = $this->handleCategory($categoryId);
    }
313905
protected function serviceFromDefinition($id, $args)
    {
        // create the service object
        $service = $this->createServiceObject($id, $args);

        // run predefined methods if any
        $this->runDefinedMethods($id, $service);

        // decorate the service if DecorateExtension loaded
        $this->decorateService($service);

        return $service;
    }
936634
public function get($id, $args = null) {
		if (isset($this->checkedIds[$id]) && ! $this->checkedIds[$id]) {
			throw new Exceptions\ServiceNotFound('Unable to found the service "' . $id . '"');
		}
		
		$args = $this->resolveArgs(func_get_args());
		
		try {
			$service = ($args === null)
				? $this->getService($id)
				: $this->getServiceByArgs($id, $args);
		}
		catch (Exceptions\ServiceNotFound $exception) {
			$this->checkedIds[$id] = false;
			throw $exception;
		}
		
		$this->checkedIds[$id] = true;
		return $service;
	}
305790
public static function add_field( $config_id, $args ) {

		// if Kirki exists, use it.
		if ( class_exists( 'Kirki' ) ) {
			Kirki::add_field( $config_id, $args );
			return;
		}

		// Kirki was not located, so we'll need to add our fields here.
		// Check that the "settings" & "type" arguments have been defined.
		if ( isset( $args['settings'] ) && isset( $args['type'] ) ) {

			// Make sure we add the config_id to the field itself.
			// This will make it easier to get the value when generating the CSS later.
			if ( ! isset( $args['kirki_config'] ) ) {
				$args['kirki_config'] = $config_id;
			}
			self::$fields[ $args['settings'] ] = $args;
		}
	}
1337915
public function setBarPanel(PanelInterface $panel = null, $id = null)
    {
        $panel and Tracy::getBar()->addPanel($this->barPanels[$id] = $panel, $id);
        return $this;
    }
1254931
public function get($id, $args = [])
    {
        $wpcli_args = buildCLIArgs(
            array(
                'field',
                'fields',
            ),
            $args
        );

        array_unshift($wpcli_args, $args['taxonomy'], $id, '--format=json');
        $term = $this->drivers->getDriver()->wpcli('term', 'get', $wpcli_args)['stdout'];
        $term = json_decode($term);

        if (! $term) {
            throw new UnexpectedValueException(sprintf('[W503] Could not find term with ID %d', $id));
        }

        return $term;
    }
181465
public function addParts($id, $data) {
		// find
		$model = $this->get($id);

		if ($model === null) {
			return new NotFound(['message' => 'Skill not found.']);
		}

		// pass add to internal logic
		try {
			$this->doAddParts($model, $data);
		} catch (ErrorsException $e) {
			return new NotValid(['errors' => $e->getErrors()]);
		}

		// save and dispatch events
		$this->dispatch(SkillEvent::PRE_PARTS_ADD, $model, $data);
		$this->dispatch(SkillEvent::PRE_SAVE, $model, $data);
		$rows = $model->save();
		$this->dispatch(SkillEvent::POST_PARTS_ADD, $model, $data);
		$this->dispatch(SkillEvent::POST_SAVE, $model, $data);

		if ($rows > 0) {
			return Updated(['model' => $model]);
		}

		return NotUpdated(['model' => $model]);
	}
653314
public function add($id, array $tags)
    {
        $this->connection()->pipeline(function ($pipe) use ($id, $tags) {
            foreach ($tags as $tag) {
                $pipe->zadd($tag, $id, $id);
            }
        });
    }
1138459
public static function add( $type, $control_id, $args ) {
		$control = static::_control( $type, $control_id, $args );
		if ( $control ) {
			static::$controls[ $control->get_id() ] = $control;
		}
		return $control;
	}
879535
public function addColumn($id, $title, $options = array())
    {
        $returnValue = null;

        
		$replace = false;
		if(isset($options['replace'])){
			$replace = $options['replace'];
			unset($options['replace']);
		}
		if(!$replace && isset($this->columns[$id])){
			throw new common_Exception('the column with the id '.$id.' already exists');
		}else{
			$this->columns[$id] = new tao_helpers_grid_Column($id, $title, $options);
			//set order as well:
			$returnValue = true;
		}
        

        return $returnValue;
    }
116675
public function includeTemplate($id, $path, array $args = [], $linear = 'yes', array $properties = []){
		if( !file_exists($path) ){
			return false;
		}
		if( !empty($args) ){
			extract($args);
		}
		ob_start();
		include $path;
		$content = ob_get_contents();
		ob_end_clean();
		return $this->registerHTML($id, $content, $linear, $properties);
	}
70798
function (out, args) {
            var sections = args.sections;
            for (var i = 0, l = sections.length; i < l; i++) {
                this.__$insertSection(null, sections[i]);
            }
        }
67956
public function get($id, $args = [])
    {
        $wpcli_args = buildCLIArgs(
            array(
                'field',
                'fields',
            ),
            $args
        );

        array_unshift($wpcli_args, $id, '--format=json');
        $comment = $this->drivers->getDriver()->wpcli('comment', 'get', $wpcli_args)['stdout'];
        $comment = json_decode($comment);

        if (! $comment) {
            throw new UnexpectedValueException(sprintf('[W500] Could not find comment with ID %d', $id));
        }

        return $comment;
    }
925274
public function addSections(array $sections): PageInterface
    {
        $sections = array_merge(
            $this->repository()->getSections()->all(),
            $sections
        );

        array_walk($sections, function ($section) {
            // Set a default view to each section if none defined.
            /** @var SectionInterface $section */
            if (empty($section->getView())) {
                $section->setView('section');
            }
        });

        $this->repository()->setSections($sections);

        return $this;
    }
920044
public function update($id, $data)
    {
        $sections = empty($data['sections']) ? [] : $data['sections'];

        return $this->_sendPayload(
            $this->_getService($this->_pageServiceKey)->updateTemplateSections($id, $sections)
        );
    }