/** * Create a new account activation notification. * * @param User $user * * @return Notification */ public static function accountActivation(User $user, $activationCode) { $message = new static(Language::translate('notifications.account_activation.subject', ['title' => setting('title')]), View::render('notifications/account_activation.txt.php', ['user' => $user, 'activationCode' => $activationCode])); $message->setTo($user->email, $user->name); return $message; }
/** * Renders the subscription link * for the passed object. * * @param object $object */ public static function linkFor($object) { $class = new ReflectionClass(get_class($object)); return View::render('subscriptions/_subscribe.phtml', ['type' => strtolower($class->getShortName()), 'object' => $object]); }
/** * Render a view. * * @param string $view * @param array $locals * @return Response */ protected function renderView($view, array $locals = []) { $content = View::render($view, $locals); if (isset($locals['_layout']) && $locals['_layout']) { $content = View::render("layouts/{$locals['_layout']}", ['content' => $content]); } return $content; }
/** * Render a view. * * @param string $view view file * @param arrray $locals local variables * * @return string */ function view($view, array $locals = []) { return View::render($view, $locals); }