Source of file ReferenceField.php
Size: 1,824 Bytes - Last Modified: 2021-12-23T10:53:14+00:00
/var/www/docs.ssmods.com/process/src/code/forms/ReferenceField.php
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 | <?php /** * Class ReferenceField */ class ReferenceField extends DatalessField { /** @var string $hint */ protected $hint; /** @var string $imageFilename */ protected $imageFilename; /** @var string $imagePath */ protected $imagePath; /** @var string $base_image_path */ private static $base_image_path = 'mysite/dist/images/cms/reference'; /** @var string $border_color */ private static $border_color = '#0073aa'; public function __construct($name, $title = null, $hint = '', $imageFilename = '') { $this->setHint($hint); $this->setImageFilename($imageFilename); $this->setImagePath(); parent::__construct($name, $title); } /** * @param string $hint * @return ReferenceField $this */ public function setHint($hint) { $this->hint = $hint; return $this; } /** * @return string */ public function getHint() { return $this->hint; } /** * @return ReferenceField $this */ protected function setImagePath() { $this->imagePath = Controller::join_links(self::config()->get('base_image_path'), $this->getImageFilename()); return $this; } /** * @return string */ public function getImagePath() { return $this->imagePath; } public function getBorderColor() { return self::config()->get('border_color'); } /** * @param string $imageFilename * @return ReferenceField $this */ public function setImageFilename($imageFilename) { $this->imageFilename = $imageFilename; return $this; } /** * @return string */ public function getImageFilename() { return $this->imageFilename; } } |