Lines Matching refs:Snippet

38 class Snippet implements JsonSerializable  class
178 public static function createCssSnippetFromComponentId($componentId): Snippet
180 return Snippet::createSnippetFromComponentId($componentId, self::EXTENSION_CSS);
186 public static function createSnippetFromComponentId($componentId, $type): Snippet
189 return Snippet::createSnippetFromPath($path)
199 * @return Snippet
201 … public static function getOrCreateFromComponentId(string $componentId, string $extension): Snippet
220 * @return Snippet[]
235 * @return Snippet
237 public static function createSnippet(Path $path): Snippet
239 return new Snippet($path);
256 public static function createSnippetFromPath(WikiPath $path): Snippet
258 return new Snippet($path);
265 * @return Snippet
267 public static function getOrCreateFromContext(Path $localSnippetPath): Snippet
335 $snippet->addElement(Snippet::REQUEST_SCOPE);
347 public static function createComboSnippet(string $wikiPath): Snippet
355 * @return Snippet
359 public static function getOrCreateFromLibraryNamespace(string $wikiPath): Snippet
374 public static function getOrCreateFromRemoteUrl(Url $url): Snippet
386 $localPath = WikiPath::createComboResource(Snippet::LIBRARY_BASE . ":$libraryName");
402 public static function createJavascriptSnippetFromComponentId(string $componentId): Snippet
404 return Snippet::createSnippetFromComponentId($componentId, self::EXTENSION_JS);
410 * @return Snippet for chaining
424 public function setCritical($bool): Snippet
436 public function setDoesManipulateTheDomOnRun($bool): Snippet
444 * @return Snippet for chaining
446 public function setInlineContent($inlineContent): Snippet
579 public static function createFromJson($array): Snippet
588 $snippet = Snippet::getOrCreateFromContext($wikiPath);
641 public function setIntegrity(?string $integrity): Snippet
650 public function addHtmlAttribute(string $name, string $value): Snippet
656 public function addElement(string $element): Snippet
872 if ($this->getExtension() === Snippet::EXTENSION_JS) {
937 case Snippet::EXTENSION_JS:
939 case Snippet::EXTENSION_CSS:
941 return Snippet::STYLE_TAG;
943 return Snippet::LINK_TAG;
952 public function setComponentId(string $componentId): Snippet
958 public function setRemoteUrl(Url $url): Snippet
993 case Snippet::EXTENSION_JS:
1034 case Snippet::EXTENSION_CSS:
1168 * @return Snippet
1170 public function setFormat(string $format): Snippet