Removes tags by name.

@param string|array|Argument $argumentName

@return \ClassGeneration\ArgumentCollection
186934
public function removeByName($argumentName)
    {
        $removedList = new self();
        $list = $this->getIterator();
        foreach ($list as $index => $argument) {
            if (($argumentName instanceof Argument && $argumentName->getName() != $argument->getName())
                || (is_string($argumentName) && $argument->getName() !== $argumentName)
            ) {
                continue;
            }
            $removedList->add(clone $argument);
            $this->remove($index);
        }

        return $removedList;
    }
811034
public function untag($tags = null)
    {
        if (empty($tags)) {
            return $this->_updateTags([], 'replace');
        }

        $table = TableRegistry::getTableLocator()->get($this->source());
        $behavior = $table->behaviors()->Tag;
        $assoc = $table->getAssociation($behavior->getConfig('tagsAlias'));
        $property = $assoc->getProperty();
        $id = $this->get($table->getPrimaryKey());
        $untags = $behavior->normalizeTags($tags);

        $tags = $this->get($property);
        if (!$tags) {
            $contain = [$behavior->getConfig('tagsAlias')];
            $tags = $table->get($id, compact('contain'))->get($property);
        }

        $tagsTable = $table->{$behavior->getConfig('tagsAlias')};
        $pk = $tagsTable->getPrimaryKey();
        $df = $tagsTable->getDisplayField();

        foreach ($tags as $k => $tag) {
            $tags[$k] = [
                $pk => $tag->{$pk},
                $df => $tag->{$df},
            ];
        }

        foreach ($untags as $untag) {
            foreach ($tags as $k => $tag) {
                if ((empty($untag[$pk]) || $tag[$pk] === $untag[$pk]) &&
                    (empty($untag[$df]) || $tag[$df] === $untag[$df])
                ) {
                    unset($tags[$k]);
                }
            }
        }

        return $this->_updateTags(
            array_map(
                function ($i) {
                    return implode(':', $i);
                },
                $tags
            ),
            'replace'
        );
    }
408427
public function remove($fieldname)
    {
        if (isset($this->fields[$fieldname]))
            unset($this->fields[$fieldname]);

        return $this;
    }
291578
public static function removeTagName(\DOMDocument $domdocument, $tagname)
    {
        $nodeLista = $domdocument->getElementsByTagName($tagname);
        if ($nodeLista->length > 0) {
            $node = $nodeLista->item(0);
            XmlUtil::removeNode($node);
            return true;
        } else {
            return false;
        }
    }
1175142
public function removeArguments(array $arguments = null)
  {
    $this->arguments = array();

    if ($arguments) {
      $this->addArguments($arguments);
    }

    return $this;
  }
75619
private function filterStripTags($value, $argument = null)
    {
        $allowedTags = array('<p>', '<a>', '<b>', '<i>', '<em>', '<strong>', '<img>', '<br>', '<ul>', '<ol>', '<li>', '<span>', '<blockquote>', '<code>', '<sub>', '<sup>', '<h1>', '<h2>', '<h3>', '<h4>', '<h5>', '<h6>', '<dd>', '<dl>', '<label>');

        return strip_tags($value, join(null, $allowedTags));
    }
929610
public function removeTagsByName($tagName)
    {
        $this->tags = array_filter(
            $this->tags,
            function (TagInterface $tag) use ($tagName) {
                return $tag->getTagName() !== $tagName;
            }
        );
    }
322421
public function removeTag($name)
    {
        foreach ($this->tags as $i => $tag) {
            if (strtolower($tag->getName()) == $name) {
                unset($this->tags[$i]);
            }
        }
    }
837436
public function setName($name)
    {
        if (!preg_match('/^' . self::REGEX_TAGNAME . '$/u', $name)) {
            throw new \InvalidArgumentException(
                'Invalid tag name supplied: ' . $name
            );
        }

        $this->tag = $name;

        return $this;
    }
389869
public function removeArgument(Argument $argument)
    {
        $key = array_search($argument, $this->arguments, true);

        unset($this->arguments[$key]);

        return $this;
    }
896716
public function getTagsByTagName( $tagName )
	{
		$list	= array();
		$nodes	= $this->document->getElementsByTagName( $tagName );
		foreach( $nodes as $node )
			$list[]	= $node;
		return $list;
	}
898033
protected function resolveName($argumentNameOrInterface, $method)
    {
        if ($argumentNameOrInterface instanceof ArgumentInterface) {
            $argumentNameOrInterface = $argumentNameOrInterface->getName();
        }

        return $this->resolveString($argumentNameOrInterface, $method);
    }
267533
public function argumentNames()
    {
        $out = [];
        foreach ($this->_args as $arg) {
            $out[] = $arg->name();
        }

        return $out;
    }
1168597
protected function findTags(ContainerBuilder $container, $tagName, $argumentPosition, $ext = false): void
    {
        $services = [];

        foreach ($container->findTaggedServiceIds($tagName) as $serviceId => $tag) {
            $class = isset($tag[0]['class'])
                ? $this->getRealClassName($container, $tag[0]['class'])
                : $this->getClassName($container, $serviceId, $tagName);
            $class = $this->findResolveTarget($container, $class);
            $this->replaceResolveTargetClass($container, $tagName, $serviceId, $class);

            // Flip, because we want tag classe names (= type identifiers) as keys
            if ($ext) {
                $services[$class][] = $serviceId;
            } else {
                $services[$class] = $serviceId;
            }
        }

        $container->getDefinition('fxp_default_value.extension')->replaceArgument($argumentPosition, $services);
    }
827007
public function removeGroup($groupName)
    {
        if (true === is_string($groupName) && true === in_array($groupName, $this->groups)) {
            foreach (array_keys($this->groups, (string)$groupName, true) as $key) {
                unset($this->groups[$key]);
            }
        }
        return $this;
    }
413582
public function collection($classname, ...$args)
    {
        $resource = $this->resolve($classname);
        return $resource->collection(...$args);
    }
1054393
public function removeGroup(string $groupName)
    {
        $tagGroup = TagGroup::query()->where('slug', $this->taggingUtility->slug($groupName))->first();

        if ($tagGroup) {
            $this->group()->dissociate($tagGroup);
            $this->save();

            return $this;
        } else {
            throw new \RuntimeException('No Tag Group found: '. $groupName);
        }
    }