Stop injecting content into a section.

@throws \InvalidArgumentException
484165
protected function endSection()
    {
        if (empty($this->scope->sectionStack)) {
            throw new InvalidArgumentException('Cannot end a section without first starting one.');
        }

        $last = array_pop($this->scope->sectionStack);
        $this->storeSection($last, ob_get_clean());
    }
1253109
public function removeRawContent($contentId)
    {
        $this->locationGateway->removeElementFromTrash(
            $this->loadContentInfo($contentId)->mainLocationId
        );

        foreach ($this->listVersions($contentId) as $versionInfo) {
            $this->fieldHandler->deleteFields($contentId, $versionInfo);
        }
        // Must be called before deleteRelations()
        $this->contentGateway->removeReverseFieldRelations($contentId);
        $this->contentGateway->deleteRelations($contentId);
        $this->contentGateway->deleteVersions($contentId);
        $this->contentGateway->deleteNames($contentId);
        $this->contentGateway->deleteContent($contentId);
    }
983124
protected void endContent() throws RepositoryException {
        // Process the content of the element ...
        String content = StringUtil.normalize(contentBuilder.toString());
        // Null-out builder to setup for subsequent content.
        // Must be done before call to startElement below to prevent infinite loop.
        contentBuilder = null;
        // Skip if nothing in content but whitespace
        if (content.length() > 0) {
            // Create separate node for each content entry since entries can be interspersed amongst child elements
            startNode(XmlLexicon.ELEMENT_CONTENT, XmlLexicon.ELEMENT_CONTENT);
            currentNode.setProperty(XmlLexicon.ELEMENT_CONTENT, content);
            endNode();
        }
    }
1081606
public function destroy()
    {
        $this->registry[$this->section] = array();
        $dcc = $this->getDrupalCommonConnector();

        $dcc->variable_del($this->section);

        $content = $dcc->variable_get($this->section, array());

        if (!empty($content)) {
            throw new \InvalidArgumentException(
                "Section $this->section could not be destroyed from the registry."
            );
        }
    }
767286
private void popContentSource() {
        buffer = nextContentSource.buffer;
        position = nextContentSource.position;
        limit = nextContentSource.limit;
        nextContentSource = nextContentSource.next;
    }
1109407
public function clear()
    {
        if (!($this->_content instanceof ContentSet)) {
            throw new ClassContentException(
                sprintf('Can not clear an content %s.', get_class($this)),
                ClassContentException::UNKNOWN_ERROR
            );
        }

        $this->_data = array();
        $this->_index = 0;
    }
169422
public function endSection(SectionInterface $section)
    {
        $this->newLine();

        if ($this->output->isVerbose()) {
            $message = sprintf('Section <fg=green>%s</> finished in <fg=green>%ss</>', $section->getName(), $this->timer->end($section));
            $this->writeln($message);
            $this->writeln(str_repeat('=', $this->lineLength));
            $this->newLine(3);
        }
    }
564892
public function clearExif()
    {
        $idx = 0;
        while ($idx < count($this->sections)) {
            $s = $this->sections[$idx];
            if (($s[0] == PelJpegMarker::APP1) && ($s[1] instanceof PelExif)) {
                array_splice($this->sections, $idx, 1);
                $idx--;
            } else {
                ++ $idx;
            }
        }
    }
814011
protected function stopTwig()
    {
        if (!$this->isTwigStarted) {
            return;
        }

        $markupManager = MarkupManager::instance();
        $markupManager->endTransaction();

        $this->isTwigStarted = false;
    }
879557
public function removeProperty( $section, $key )
	{
		if( !$this->hasProperty( $section, $key ) )
			throw new InvalidArgumentException( 'Key "'.$key.'" is not existing in Section "'.$section.'".' );
		unset( $this->data[$section][$key] );
		return is_int( $this->write() );
	}
961270
public function stop_fancy_stuff(): self
  {
    $this->setAttribute(\PDO::ATTR_STATEMENT_CLASS, [\PDOStatement::class]);
    $this->fancy = false;
    return $this;
  }
471584
def content_break(self, el):
        """"""

        should_break = False
        if self.type == 'odp':
            if el.name == 'page' and el.namespace and el.namespace == self.namespaces['draw']:
                should_break = True
        return should_break
1227130
private function end($name)
    {
        $this->last = $this->names->pop();
        if (! is_null($name) && $this->last !== $name) {
            $n = is_string($name) ? $name : 'a bad';
            $msg = 'You tried to close %s section where you should have closed %s.';
            throw new InvalidArgumentException(sprintf($msg, $n, $this->last));
        }

        return $this->stack->pop();
    }
1225821
public function breakEmbedding():self
	{
		$this->append($this->embedment->getContent());
		$this->embedment= null;

		return $this;
	}
297776
public function delete($id)
    {
        $contentCount = $this->sectionGateway->countContentObjectsInSection($id);

        if ($contentCount > 0) {
            throw new RuntimeException(
                "Section with ID '{$id}' still has content assigned."
            );
        }
        $this->sectionGateway->deleteSection($id);
    }
517258
public function removeContent(\Coral\ContentBundle\Entity\Content $contents)
    {
        $this->contents->removeElement($contents);
    }
1280396
public function endsection(string $name = null): void
    {
        // You can specify the section name for sanity-check purpose.
        if (! is_null($name) && $this->sectionStack[0] != $name) {
            throw new \LogicException('unmatched end-section: ' . $name . ', expects: ' . $this->sectionStack[0]);
        }

        $output = ob_get_clean();

        $name = array_shift($this->sectionStack);
        $this->sections[$name] = $output;
    }