Skip to content

Commit

Permalink
Merge pull request #1 from chromos33/main
Browse files Browse the repository at this point in the history
Bildformate Konfigurierbar
  • Loading branch information
moritz-sauer-13 authored Apr 17, 2023
2 parents 8f9ca33 + db29b0f commit a0a5ca4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
5 changes: 5 additions & 0 deletions _config/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,3 +171,8 @@ MoritzSauer\ContentElement:
ImageWidth: 195
# description to the layout-select in the cms
FieldDescription: 'Nach der Auswahl zuerst speichern.'
ImageFormats:
TreeToTwo: '3:2'
OneToOne: '1:1'
ThreeToFour: '3.4'
SixteenToNine: '16:9'
9 changes: 2 additions & 7 deletions src/Extensions/ElementContentExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,7 @@ class ElementContentExtension extends DataExtension{
];

private function imageFormatValues(){
return [
'TreeToTwo' => '3:2',
'OneToOne' => '1:1',
'ThreeToFour' => '3:4',
'SixteenToNine' => '16:9',
];
return Config::inst()->get('MoritzSauer\ContentElement')["ImageFormats"];
}

/*Update CMS fields*/
Expand Down Expand Up @@ -321,4 +316,4 @@ public function Title()
{
return (str_replace("|", "­", $this->owner->Title));
}
}
}

0 comments on commit a0a5ca4

Please sign in to comment.