@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | $image->setRightTitle("Displayed to the right of the content in the main article, where it can be clicked to enlarge. <br />A thumbnail also appears next to the article summary on the main News page."); |
55 | 55 | $fields->addFieldToTab('Root.Main', $image, "Content"); |
56 | 56 | |
57 | - }); |
|
57 | + }); |
|
58 | 58 | |
59 | 59 | $fields = parent::getCMSFields(); |
60 | 60 | |
@@ -98,13 +98,13 @@ discard block |
||
98 | 98 | parent::init(); |
99 | 99 | } |
100 | 100 | |
101 | - // Provides a resized image with the max width provided |
|
102 | - public function ArticleImageSized($maxwidth = 250) |
|
103 | - { |
|
104 | - if ($this->AttachedImage()->getWidth() < $maxwidth) { |
|
105 | - return $this->AttachedImage(); |
|
106 | - } else { |
|
107 | - return $this->AttachedImage()->setWidth($maxwidth); |
|
108 | - } |
|
109 | - } |
|
101 | + // Provides a resized image with the max width provided |
|
102 | + public function ArticleImageSized($maxwidth = 250) |
|
103 | + { |
|
104 | + if ($this->AttachedImage()->getWidth() < $maxwidth) { |
|
105 | + return $this->AttachedImage(); |
|
106 | + } else { |
|
107 | + return $this->AttachedImage()->setWidth($maxwidth); |
|
108 | + } |
|
109 | + } |
|
110 | 110 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | public function getCMSFields() |
39 | 39 | { |
40 | - $this->beforeUpdateCMSFields(function ($fields) { |
|
40 | + $this->beforeUpdateCMSFields(function($fields) { |
|
41 | 41 | |
42 | 42 | $datefield = new DateField('Date', 'Date (DD/MM/YYYY)'); |
43 | 43 | $datefield->setConfig('showcalendar', true); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | { |
69 | 69 | |
70 | 70 | // Change MenuTitle, so date appears in CMS SiteTree |
71 | - $this->MenuTitle = $this->Date.": ".$this->Title; |
|
71 | + $this->MenuTitle = $this->Date . ": " . $this->Title; |
|
72 | 72 | |
73 | 73 | // Move to News holder if created under something else |
74 | 74 | if ($this->Parent()->ClassName != "NewsHolder") { |
@@ -9,7 +9,7 @@ |
||
9 | 9 | |
10 | 10 | $this->beforeUpdateCMSFields(function ($fields) { |
11 | 11 | $fields->renameField("Content", "Intro Content"); |
12 | - $fields->insertBefore(new Tab($this->getLumberjackTitle()), 'Main'); |
|
12 | + $fields->insertBefore(new Tab($this->getLumberjackTitle()), 'Main'); |
|
13 | 13 | }); |
14 | 14 | |
15 | 15 | $fields = parent::getCMSFields(); |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | { |
8 | 8 | $intro = null; |
9 | 9 | |
10 | - $this->beforeUpdateCMSFields(function ($fields) { |
|
10 | + $this->beforeUpdateCMSFields(function($fields) { |
|
11 | 11 | $fields->renameField("Content", "Intro Content"); |
12 | 12 | $fields->insertBefore(new Tab($this->getLumberjackTitle()), 'Main'); |
13 | 13 | }); |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | $fields = parent::getCMSFields(); |
16 | 16 | |
17 | 17 | if ($intro) { |
18 | - $intro->setRightTitle("Appears at the top of the main ".$this->Title." page, above the list of articles."); |
|
18 | + $intro->setRightTitle("Appears at the top of the main " . $this->Title . " page, above the list of articles."); |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | return $fields; |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $list = NewsArticle::get(), // an SS_List containing your feed items |
72 | 72 | $link = $this->Link("rss"), // a HTTP link to this feed |
73 | 73 | $title = $config->Title . " News", // title for this feed, displayed in RSS readers |
74 | - $description = "All the latest news from ". $config->Title . "." // description |
|
74 | + $description = "All the latest news from " . $config->Title . "." // description |
|
75 | 75 | ); |
76 | 76 | // Outputs the RSS feed to the user. |
77 | 77 | return $rss->outputToBrowser(); |