Sets view name for further rendering

@param string $name
@param bool $custom
@return $this
@throws CollectionException
353045
private function _setView($name, $custom = false)
    {
        if (!is_string($name)) {
            throw new CollectionException('View name must be a string.');
        }

        $this->_viewName = (!$custom ? 'resource-table::' : '').$name;
        return $this;
    }
822550
@SuppressWarnings("unchecked")
  public <T extends AbstractView> T named(String name) {
    setName(name);
    return (T) this;
  }
367944
public function setName($name)
    {
        if (in_array($name, self::$used_names)) {
            Throw new PageException(sprintf('The menuitem name "%s" is already in use.', $name));
        }

        $this->name = $name;

        // Store name to get safe that it's only used once
        self::$used_names[] = $name;

        return $this;
    }
1052163
public function setObjectName($name)
    {
        if (!is_null($name)) {
            $name = (string) $name;
        }

        $this->objectName = $name;
        return $this;
    }
198261
public function setName($name)
    {
        if (!is_string($name)) {
            throw new \LogicException(sprintf('Route name given "%s" is invalid. String expected.', gettype($name)));
        }
        $this->name = $name;
        
        return $this;
    }
344414
public function setDisplayName($name)
    {
        if (!is_null($name)) {
            $name = (string) $name;
        }

        $this->displayName = $name;
        return $this;
    }
510308
public function setName($name)
    {
        $this->name = $name;
        if (isset($_FILES) && array_key_exists($name, $_FILES)) {
            $this->setValue($_FILES[$name]);
        }
        return $this;
    }
348238
public function customfieldsByFieldset($grid, $name)
    {
        if (!extension_active('customfields')) {
            return;
        }
        $customfields = app('customfields')->get();
        $items        = [];
        $reserved     = [];
        foreach ($customfields as $classname => $fields) {
            if (get_class($grid->row) !== $classname) {
                continue;
            }
            foreach ($fields as $field) {
                if ($field->getFieldset() === $name) {
                    $reserved[] = $field->getName();
                    $items[]    = $field;
                }
            }
        }
        foreach ($items as $item) {
            $this->addCustomfield($grid, $item);
        }
        $query = \Antares\Customfields\Model\FieldView::query();
        if (!empty($reserved)) {
            $query->whereNotIn('name', $reserved);
        }

        $fields = $query->whereHas('fieldFieldset', function ($query) use ($name) {
                    $query->whereHas('fieldset', function ($subquery) use ($name) {
                        $subquery->where('name', $name);
                    });
                })->get();
        foreach ($fields as $field) {
            $this->addCustomfield($grid, $field);
        }
        return $this;
    }
604895
public function setName($name)
    {
        if (!is_string($name) && !is_null($name)) {
            throw new \InvalidArgumentException(__CLASS__ . ' ' . __METHOD__ . ': Not a string');
        }

        $this->name = $name;

        return $this;
    }
416859
public function setName($name)
    {
        if (!is_string($name) || (strlen($name) <= 0)) {
            $explodedNamespace = explode('\\', get_class($this));
            $class = $explodedNamespace[count($explodedNamespace) - 1];
            $asset = strtolower(preg_replace('/(.)([A-Z])/', '\\1 \\2', $class));

            throw SchemaException::invalidAssetName($asset);
        }

        $this->name = $name;
    }
930379
public function setName(string $name) : core\interfaces\Named
    {
        return parent::setName(ltrim($name, '-'));
    }
690722
public function setModelName($name)
    {
        $this->_modelName = $name;
        $nameParts = explode("\\", $name);
        $controllerName = end($nameParts);
        $nameParts = Text::camelCaseToSeparator($controllerName, '#');
        $nameParts = explode('#', $nameParts);

        $final = Text::plural(strtolower(array_pop($nameParts)));
        $nameParts[] = ucfirst($final);
        $this->set('modelPlural', lcfirst(implode('', $nameParts)));
        $this->set('modelSingular', lcfirst($controllerName));
        return $this;
    }
1004273
public function setName($name)
    {
        assert(is_string($name));

        if ($this->_name !== null && $this->_name !== $name) {
            throw new ClientException('Should not update the name of an existing collection');
        }

        $this->_name = (string) $name;
    }
1007235
public function setName($name)
    {
        $this->name = $name;

        $this->model()->setPerPageName("{$name}_{$this->model()->getPerPageName()}");

        $this->getFilter()->setName($name);

        return $this;
    }
963953
protected function assertViewVariableName($name)
    {
        if (!is_string($name)) {
            $type = (is_object($name) ? get_class($name) . ' ' : '') . gettype($name);
            throw new \InvalidArgumentException("Expected name to be a string, not a $type");
        }

        if (!preg_match('/^[a-z]\w*$/i', $name)) {
            throw new \InvalidArgumentException("Invalid name '$name'");
        }
    }
1137892
public function setName($name) {
		if (is_array($name) && empty($name)) {
			$this->name = new \stdClass;
		} else {
			$this->name = $name;
		}

		return $this;
	}
665433
public function setName(string $name): AbstractSuggest
    {
        if (empty($name)) {
            throw new InvalidException('Suggest name has to be set');
        }
        $this->_name = $name;

        return $this;
    }