uawdijnntqw1x1x1
IP : 216.73.216.58
Hostname : toronto-dev2
Kernel : Linux toronto-dev2 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
srv
/
users
/
craft4
/
apps
/
craft4-newsite-space
/
vendor
/
verbb
/
navigation
/
src
/
.
/
nodetypes
/
CustomType.php
/
/
<?php namespace verbb\navigation\nodetypes; use verbb\navigation\base\NodeType; use Craft; use craft\helpers\App; class CustomType extends NodeType { // Static Methods // ========================================================================= public static function displayName(): string { return Craft::t('navigation', 'Custom URL'); } public static function hasTitle(): bool { return true; } public static function hasUrl(): bool { return true; } public static function hasNewWindow(): bool { return true; } public static function getColor(): string { return '#0d78f2'; } // Public Methods // ========================================================================= public function getModalHtml(): ?string { return Craft::$app->getView()->renderTemplate('navigation/_types/custom/modal', [ 'node' => $this->node, ]); } public function getUrl(): ?string { $url = $this->node->getRawUrl(); // Parse aliases and env variables $url = App::parseEnv($url); // Allow twig support if ($url && strstr($url, '{')) { $object = $this->_getObject(); $url = Craft::$app->getView()->renderObjectTemplate($url, $object); } return $url; } // Private Methods // ========================================================================= private function _getObject(): array { return [ 'currentUser' => Craft::$app->getUser()->getIdentity(), ]; } }
/srv/users/craft4/apps/craft4-newsite-space/vendor/verbb/navigation/src/./nodetypes/CustomType.php