Add a new sitemap tag to the sitemap.

@param  \Watson\Sitemap\Tags\Tag|string  $location
@param  \DateTime|string  $lastModified
@param  string  $changeFrequency
@param  string  $priority
@return \Watson\Sitemap\Tags\Tag
760722
public function addTag($location, $lastModified = null, $changeFrequency = null, $priority = null)
    {
        $tag = $location instanceof Tag ? $location : new Tag($location, $lastModified, $changeFrequency, $priority);

        $this->tags[] = $tag;

        return $tag;
    }
1324567
public JobSchedulePatchHeaders withLastModified(DateTime lastModified) {
        if (lastModified == null) {
            this.lastModified = null;
        } else {
            this.lastModified = new DateTimeRfc1123(lastModified);
        }
        return this;
    }
638692
public function addMenuEntry($location, MenuEntry $menuEntry, $priority = 50)
    {
        if (!isset($this->menuEntries[$location])) {
            $this->menuEntries[$location] = array();
        }
        
        if (!isset($this->menuEntries[$location][$priority])) {
            $this->menuEntries[$location][$priority] = array();
        }

        if (isset($this->menuEntries[$location][$priority][$menuEntry->getKey()])) {
            return false;
        }
        
        $this->menuEntries[$location][$priority][$menuEntry->getKey()] = $menuEntry;
        
        ksort($this->menuEntries[$location]);
        uasort($this->menuEntries[$location][$priority], array($this, 'sortMenuEntries'));
        
        return true;
    }
918974
public function addStyle($element, $priority = 0, $location = 'head')
    {
        if (!\is_array($element)) {
            $element = ['href' => (string) $element];
        }
        if (empty($element['href'])) {
            return false;
        }
        if (!isset($this->styles[$location])) {
            $this->styles[$location] = [];
        }

        $id = !empty($element['id']) ? ['id' => (string) $element['id']] : [];
        $href = $element['href'];
        $type = !empty($element['type']) ? (string) $element['type'] : 'text/css';
        $media = !empty($element['media']) ? (string) $element['media'] : null;
        unset(
            $element['tag'],
            $element['id'],
            $element['rel'],
            $element['content'],
            $element['href'],
            $element['type'],
            $element['media']
        );

        $this->styles[$location][md5($href) . sha1($href)] = [
                ':type' => 'file',
                ':priority' => (int) $priority,
                'href' => $href,
                'type' => $type,
                'media' => $media,
                'element' => $element
            ] + $id;

        return true;
    }
635991
public function put($data,
                        $priority = null,
                        $delay = null,
                        $ttr = null)
    {
        $priority = $priority ?? PheanstalkInterface::DEFAULT_PRIORITY;
        $delay = $delay ?? PheanstalkInterface::DEFAULT_DELAY;
        $ttr = $ttr ?? PheanstalkInterface::DEFAULT_TTR;

        return $this->client->put($data, $priority, $delay, $ttr);
    }
975210
public function addFormConfigurationModifier(FormConfigurationModifierInterface $modifier, $priority = 0)
    {
        $this->formConfigurationModifiers[$priority][] = $modifier;
        $this->needsSorting = true;
    }
714865
public function createFormForLocation(Location $location, $useAjax = false)
    {
        $contentInfo = $location->contentInfo;

        $contentType = $this->contentTypeService->loadContentType($contentInfo->contentTypeId);

        $data = new DataWrapper(new InformationCollectionStruct(), $contentType, $location);

        $formBuilder = $this->formFactory
            ->createBuilder(
                Kernel::VERSION_ID < 20800 ?
                    'ezforms_information_collection' :
                    InformationCollectionType::class,
                $data,
                array(
                    'csrf_protection' => $this->useCsrf,
                )
            );

        if ($useAjax) {
            $formBuilder->setAction($this->router->generate('netgen_information_collection_handle_ajax', array('location' => $location->id)));
        }

        return $formBuilder;
    }
789496
public function addLocation(\CampaignChain\CoreBundle\Entity\Location $locations)
    {
        $this->locations[] = $locations;

        return $this;
    }
588229
public function addVisitor($location, RequestVisitorInterface $visitor)
    {
        $this->factory->addRequestVisitor($location, $visitor);

        return $this;
    }
229732
public PoolUpdatePropertiesHeaders withLastModified(DateTime lastModified) {
        if (lastModified == null) {
            this.lastModified = null;
        } else {
            this.lastModified = new DateTimeRfc1123(lastModified);
        }
        return this;
    }
1066646
public function setChangeFreq($freq)
    {
        if (!$freq instanceof ChangeFrequency) {
            $freq = new ChangeFrequency(strval($freq));
        }
        $this->elements[self::ELEMENT_CHANGEFREQ] = $freq;

        return $this;
    }
2907
public JobScheduleGetHeaders withLastModified(DateTime lastModified) {
        if (lastModified == null) {
            this.lastModified = null;
        } else {
            this.lastModified = new DateTimeRfc1123(lastModified);
        }
        return this;
    }
1158587
public function url($url, $change_freq = null, $priority = null, $lastmod = null) {
        $tag = "<url>\n";
        $tag .= "\t<loc>{$url}</loc>\n";
        if ($change_freq) {
            $tag .= "\t<changefreq>{$change_freq}</changefreq>\n";
        }
        if ($priority) {
            $tag .= "\t<priority>{$priority}</priority>\n";
        }
        if ($lastmod) {
            $lastmod = date('Y-m-d', strtotime($lastmod));
            $tag .= "\t<lastmod>{$lastmod}</lastmod>\n";
        }

        $tag .= "</url>\n";
        return $tag;
    }
196066
public function setChangeFreq($changeFreq)
    {
        self::writeFullTag(
            $changeFreq,
            'changefreq',
            false,
            'changefreq',
            $this->validator,
            'validateChangeFreq',
            $this->exception,
            'Provided change frequency is not a valid value.'
        );

        return $this;
    }
518845
public function changePositionAction($pageId, $menuName, $newPosition)
    {
        if ($this->getRequest()->isXmlHttpRequest())
        {
            $pageMenuRepo = $this->getDoctrine()->getRepository('FulgurioLightCMSBundle:PageMenu');
            $pageMenu = $pageMenuRepo->findOneBy(array('page' => $pageId, 'label' => $menuName));
            if ($pageMenu)
            {
                if ($newPosition == $pageMenu->getPosition())
                {
                    // No change
                }
                else if ($newPosition > $pageMenu->getPosition())
                {
                    if ($newPosition <= $pageMenuRepo->getLastMenuPosition($pageMenu->getLabel()))
                    {
                        // Down !
                        $pageMenuRepo->upMenuPagesPosition($pageMenu->getLabel(), $pageMenu->getPosition() + 1, $newPosition);
                        $pageMenu->setPosition($newPosition);
                        $em = $this->getDoctrine()->getManager();
                        $em->persist($pageMenu);
                        $em->flush();
                    }
                }
                else if ($pageMenu->getPosition() > 1)
                {
                    // Up !
                    $pageMenuRepo->downMenuPagesPosition($pageMenu->getLabel(), $newPosition, $pageMenu->getPosition());
                    $pageMenu->setPosition($newPosition);
                    $em = $this->getDoctrine()->getManager();
                    $em->persist($pageMenu);
                    $em->flush();
                }
                else {
                    // doesn t happen
                }
            }
            return new Response();
        }
        throw new AccessDeniedException();
    }
219449
public TaskListHeaders withLastModified(DateTime lastModified) {
        if (lastModified == null) {
            this.lastModified = null;
        } else {
            this.lastModified = new DateTimeRfc1123(lastModified);
        }
        return this;
    }
690350
public function addAction(string $tag, callable $callback, ?int $priority = null)
    {
        $args = [$tag, $callback];
        if (!is_null($priority)) $args[] = $priority;

        return $this->callGlobalFunction('add_action', $args);
    }