Blockquote::setSource

@param string      $name
@param string|null $href

@return static
343901
public function setSource($name, $href = null)
    {
        $this->source = new Element('cite', 'source');

        if (isset($href)) {
            $this->source->childNodes->push(new Link($name, $href));
        } else {
            $this->source->textContent->push($name);
        }

        return $this;
    }
1111457
public function addBreadcrumbLinkUntranslated(string $name, string $link = null, array $arguments = []): Link
	{
		return $this['breadcrumb']->addLinkUntranslated($name, $link, $arguments);
	}
525704
public static function template($name)
    {
        $template = null;

        //
        // It's a template name or template contents?
        //
        if (preg_match('/^[A-Za-z0-9_\.\-\/]+\.html$/', $name)) {
            // It's a template name!
            $template = static::get(self::TYPE_TEMPLATE, $name);

            if (!$template) {
                $fallback_template_path = shared_storage_dir() . '/default/templates/' . $name;
                // try to retrieve local fallback template
                if (!file_exists($fallback_template_path)) {
                    throw new Exceptions\MethodFailureException("Template not found: '{$name}'. Please run `hook generate:template {$name}` to generate one.");
                }

                // use local template if can't find
                $template = new static(array(
                    'type' => self::TYPE_TEMPLATE,
                    'code' => file_get_contents($fallback_template_path),
                    'name' => $name
                ));
            }
        }

        if (!$template) {
            $template = new static(array(
                'type' => self::TYPE_TEMPLATE,
                'code' => $name,
                'name' => 'inline-template.html'
            ));
        }

        return $template;
    }
1233969
public function setName($name) {
    /** @var TokenNode $identifier */
    $identifier = $this->name->firstChild();
    $identifier->setText($name);
    return $this;
  }
977730
protected function _setResourceName( $name )
	{
		$config = $this->_context->getConfig();

		if( $config->get( 'resource/' . $name ) === null ) {
			$this->_resourceName = $config->get( 'resource/default', 'db' );
		} else {
			$this->_resourceName = $name;
		}
	}
904833
public static function setSource($source = null)
    {
        if (! is_resource($source) && ! is_null($source)) {
            throw new InvalidArgumentException(sprintf(
                'Invalid source provided; must be a null or an resource, "%s" given.',
                is_object($source) ? get_class($source) : gettype($source)
            ));
        }
        static::$source = $source;
    }
478429
public function setElementInsteadOf($targetName, $element, $name = null) {
		if (! isset($this->_elements[$targetName])) {
			return $this;
		}
		
		$elements = [];
		
		foreach ($this->_elements as $existsName => $existsElement) {
			
			if ($targetName === $existsName) {
				if ($name === null) {
					$elements[] = $element;
				} else {
					$elements[$name] = $element;
				}
			} else {
				$elements[$existsName] = $existsElement;
			}
		}
		
		$this->_elements = $elements;
		
		return $this;
	}
1057249
public function asLink($href=NULL,$target=NULL) {
		if (isset($href)) {
			$_target="";
			if(isset($target))
				$_target="target='{$target}'";
			$this->wrap("<a href='" . $href . "' {$_target}>", "</a>");
		}
		return $this->addToProperty("class", "link");
	}
209426
public function setNewlineTokenName(string $name) : BasicLexer
    {
        if (strlen($name) == 0) {
            throw new \InvalidArgumentException('The name of the newline token must be not empty.');
        }

        $this->newlineTokenName = $name;

        return $this;
    }
744832
protected function createFileResource($name)
    {
        if ($this->getResource()->getPattern() && !preg_match($this->getResource()->getPattern(), $name)) {
            $this->files[$name] = 'skip';
        } else {
            $this->files[$name] = new FileResource($this->getResource()->getResource().'/'.$name);
        }
    }
1289910
public function setDisabled($name)
    {
        $this->checkIfSnippetExists($name);
        $this->snippets[$name]['enabled'] = false;
        return $this;
    }
1118636
public function set($name, $value = null)
    {
        if ($name === 'value') {
            $value = htmlspecialchars($value);
        }
        parent::set($name, $value);

        return $this;
    }
385139
public function addResource(ResourceInterface $resource, $name = null) {
		if ($name === null) {
			$this->resources[] = $resource;
			
			return $this;
		}
		
		$this->resources[$name] = $resource;
		
		return $this;
	}
125199
public function setAttributeHref($href)
    {
        if (strpos($href, 'http') !== false) {
            $this->attributes->addAttribute('href', $href);
        } elseif (strpos($href, 'javascript') !== false) {
            $this->attributes->addAttribute('href', $href);
        } elseif (strpos($href, '#') !== false) {
            $this->attributes->addAttribute('href', $href);
        } elseif (function_exists('base_url')) {
            $this->attributes->addAttribute('href', base_url($href));
        }

        return $this;
    }
169760
public function resource($name, $resource = null)
    {
        if ($resource) {
            $this->addResource($name, $resource);
        } else {
            return $this->getResource($name);
        }
    }
14669
public function addUrl($name, $url)
    {
        $this->arguments[] = 'set-url';
        $this->arguments[] = '--add';
        $this->arguments[] = $name;
        $this->arguments[] = $url;
        return $this;
    }
931256
public function setName($name)
    {
        if (null !== $name) {
            $this->name = (string) $name;
        } else {
            $this->name = $name;
        }

        return $this;
    }