From fcfc1b2a37e704955093f8d6082d327765dbef9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sevilla=20Mart=C3=ADn?= Date: Fri, 3 Feb 2017 17:09:22 -0500 Subject: [PATCH] Add more attributes in app.blade.php and add a setDescription method. (#1105) * Added `language` and `direction` properties to WebAppView * Use properties `language` and `direction` in app.blade.php * Added WebAppView::setDescription to set the meta description * Whoops! Changed "ltr" to \'ltr\'. Thanks StyleCI :) * Removed unnecessary `= null` for * Changed `.. ? .. : ..` to `.. ?: ..`. Useful thing right there ;) --- src/Http/WebApp/WebAppView.php | 48 +++++++++++++++++++++++++++++++++- views/app.blade.php | 2 +- 2 files changed, 48 insertions(+), 2 deletions(-) diff --git a/src/Http/WebApp/WebAppView.php b/src/Http/WebApp/WebAppView.php index b44df7087..30d40f426 100644 --- a/src/Http/WebApp/WebAppView.php +++ b/src/Http/WebApp/WebAppView.php @@ -41,6 +41,20 @@ class WebAppView */ protected $description; + /** + * The language of the document, displayed as the value of the attribute `dir` in the tag. + * + * @var null|string + */ + protected $language; + + /** + * The text direction of the document, displayed as the value of the attribute `dir` in the tag. + * + * @var null|string + */ + protected $direction; + /** * The path to the client layout view to display. * @@ -188,6 +202,36 @@ class WebAppView $this->title = $title; } + /** + * The description of the document, displayed in a tag. + * + * @param null|string $description + */ + public function setDescription($description) + { + $this->description = $description; + } + + /** + * The language of the document, displayed as the value of the attribute `dir` in the tag. + * + * @param null|string $language + */ + public function setLanguage($language) + { + $this->language = $language; + } + + /** + * The language of the document, displayed as the value of the attribute `dir` in the tag. + * + * @param null|string $direction + */ + public function setDirection($direction) + { + $this->direction = $direction; + } + /** * Set the SEO content of the page, to be displayed in