From 8783883d53482f517dde1b283e7cea92f8409690 Mon Sep 17 00:00:00 2001 From: Aaron Valandra Date: Wed, 7 Sep 2016 08:57:01 -0500 Subject: [PATCH] Added comments. --- src/Parser/Field/FieldFactory.php | 1 + src/Parser/Field/Type/File.php | 1 + 2 files changed, 2 insertions(+) diff --git a/src/Parser/Field/FieldFactory.php b/src/Parser/Field/FieldFactory.php index 7dea136..bb7b07f 100644 --- a/src/Parser/Field/FieldFactory.php +++ b/src/Parser/Field/FieldFactory.php @@ -83,6 +83,7 @@ public static function build( } elseif ($data instanceof Carbon) { $type = new Date($field, $data, $config); } elseif (!$data instanceof Relations) { + //Check to see if image, imagelist, file, or filelist to handle unique rendering. if (in_array($fieldType, self::$fileTypes)) { $type = new File($field, $data, $resourceManager, $config); $type->setFieldType($fieldType); diff --git a/src/Parser/Field/Type/File.php b/src/Parser/Field/Type/File.php index 76c4782..08ff5a8 100644 --- a/src/Parser/Field/Type/File.php +++ b/src/Parser/Field/Type/File.php @@ -36,6 +36,7 @@ public function __construct( public function render() { + //Check to see if value is empty to avoid showing an empty link or adding empty values if (empty($this->getValue())) { return $this->getValue(); }