Add a link section to the body

@param string $content
@param string $uri URI

@return Bootstrap4Card
428291
public function addLinkToBody(string $content, string $uri) : Bootstrap4Card
    {
        $this->body_sections[] = [
            'type' => 'link',
            'uri' => $uri,
            'content' => $content
        ];

        return $this;
    }
148459
public function setContent($content)
    {
        if (!is_null($content)) {
            $content = (string) $content;
        }

        $this->content = $content;
        return $this;
    }
441903
public function createResource(
        $uri = "",
        $content = null,
        $headers = []
    ) {
        $options = ['http_errors' => false];

        // Set content.
        $options['body'] = $content;

        // Set headers.
        $options['headers'] = $headers;

        return $this->client->request(
            'POST',
            $uri,
            $options
        );
    }
757990
public function edit($content)
    {
        $content = $this->_defaultData($content);
        $link = str_replace('internal://', '', $content['link'], $count);
        $content['link'] = ($count > 0) ? '' : $content['link'];
        $this->_editViewData['targetOptions'] = [0 => 'Target: Same Tab', '_blank' => 'Target: New Tab'];
        $this->_editViewData['selectedPage'] = ($count > 0) ? $link : 0;
        $this->_editViewData['pageList'] = [0 => 'Custom Link: '] + Page::get_page_list();
        return parent::edit($content);
    }
114520
public function sendHttpContentTo(string $uri, string $httpMethod, string $content): Response
    {
        $kernel = $this->getDemoAppKernel();
        $kernel->boot();
        $request = Request::create($uri, $httpMethod, [], [], [], [], $content);
        $response = $kernel->handle($request);
        $kernel->terminate($request, $response);
        $kernel->shutdown();

        return $response;
    }
455549
public function setNodeByUri($uri)
    {
        $this->areas = null;
        $finder     = new Finder($this->contentPath . $uri);
        $this->node = $this->readNode($finder);
    }
1350366
public function nestedAction(Request $request, $content)
    {
        if (!$content instanceof Content) {
            $content = $this->get('opifer.content.content_manager')->getRepository()
                ->findOneById($content);
        }

        // If the content could not be found or is inactive, return an empty response
        // to avoid rendering 404 pages as nested content.
        if (!$content || !$content->getActive()) {
            return new Response('');
        }

        return $this->forward('OpiferContentBundle:Frontend/Content:view', [
            'request' => $request,
            'content' => $content
        ]);
    }
849020
protected function rewriteLinksForProduction($content)
    {
        $urlManager = $this->urlManager;

        $content = preg_replace_callback('/(\<a[^\>]+href[="\s]+)([^"\s]+)?([^\>]+\>)/s', function ($matches) use ($urlManager) {
            $url = $matches[2];

            if (preg_match('/route:([^"]+)/i', $url, $route)) {
                $url = sprintf("{{ path(%s) }}", html_entity_decode($route[1], ENT_QUOTES));

                return $matches[1] . $url . $matches[3];
            }

            $route = $urlManager
                ->fromUrl($url)
                ->getProductionRoute();

            if (null !== $route) {
                $url = sprintf("{{ path('%s') }}", $route);
            }

            return $matches[1] . $url . $matches[3];
        }, $content);

        return $content;
    }
823535
public function add($webmaster, $content)
    {
        if ( ! is_null($name = $this->getWebmasterName($webmaster))) {
            $this->metas->addOne($name, $content);
        }

        return $this;
    }
673164
public function addOption(string $content, string $value) : Option
    {
        $option = new Option($content, $value);
        $this->elements[] = $option;

        return $option;
    }
28793
public function link($url, $content = '', $options = [], $safe = false)
    {
        if (is_null($content)) {
            $content = $url;
        }

        return '<a href="'.$this->_generator->generateUrl($url).'"'.self::attributes($options).'>'.self::encode($content, $safe).'</a>';
    }
33670
public function appendSection($name, $content = null)
    {
        $section = $this->getSectionCollection()->findOrCreate($name);

        $content ? $section->appendContent($content) : $section->start();
    }
760446
public function &findPageByUri($uri)
    {
        foreach ($this->getPages() as $page) {
            if ($page->getUrl() == $uri) {
                return $page;
            }
        }

        foreach ($this->getSections() as $section) {
            $found = $section->findPageByUri($uri);
            if (! is_null($found)) {
                return $found;
            }
        }

        return;
    }
303212
public function addLink($linkSrc, $linkName = null, $style = null) {
		if($this->_insideOf == 'section') {
			
			$link = new PHPWord_Section_Link($linkSrc, $linkName, $style);
			$rID = PHPWord_Media::addSectionLinkElement($linkSrc);
			$link->setRelationId($rID);
			
			$this->_elementCollection[] = $link;
			return $link;
		} else {
			trigger_error('Unsupported Link header / footer reference');
			return false;
		}
	}
519785
protected function processUrlTag(string &$content): void
    {
        $pattern = $this->getTagPattern('url(\s+(.+?))?' . preg_quote($this->endTag, '/') . '(.+?)' . preg_quote($this->startTag . '/url', '/'));
        $content = preg_replace_callback($pattern, function ($match) {
            $matchName = $match[2];
            $matchPath = $match[3];
            $urlAsset = Application::$app->getService('urlAsset');
            if ($matchName == '') {
                return $urlAsset->getUrl($matchPath);
            } else {
                return $urlAsset->getUrl($matchPath, $matchName);
            }
        }, $content);
    }
814316
public function put($content)
    {
        $this->content = SerializationHelper::serialize($content);
        $url = $this->url;
        if (!empty($this->replaceParams)) {
            $url = self::buildUri($url, $this->replaceParams);
        }
        $this->adapter->setResponseTimeout($this->getResponseTimeout());
        $this->adapter->setConnectTimeout($this->getConnectTimeout());

        return $this->adapter->put(
            $url,
            array(
                self::HEADERS => $this->headers,
                self::CONTENT => $this->content,
            )
        );
    }
1347154
public function create(string $uri, string $content): PhpDocument
    {
        return new PhpDocument(
            $uri,
            $content,
            $this->projectIndex->getIndexForUri($uri),
            $this->parser,
            $this->docBlockFactory,
            $this->definitionResolver
        );
    }