diff --git a/modules/backend/classes/FormField.php b/modules/backend/classes/FormField.php index e14b2f481..267b78bc0 100644 --- a/modules/backend/classes/FormField.php +++ b/modules/backend/classes/FormField.php @@ -53,12 +53,12 @@ class FormField public $options; /** - * @var string Specifies a side. Possible values: auto, left, right, full + * @var string Specifies a side. Possible values: auto, left, right, full. */ public $span = 'full'; /** - * @var string Specifies a size. Possible values: tiny, small, large, huge, giant + * @var string Specifies a size. Possible values: tiny, small, large, huge, giant. */ public $size = 'large'; @@ -88,12 +88,12 @@ class FormField public $comment; /** - * @var string Specifies the comment position + * @var string Specifies the comment position. */ public $commentPosition = 'below'; /** - * @var string Specifies if the comment is in HTML format + * @var string Specifies if the comment is in HTML format. */ public $commentHtml = false; diff --git a/modules/backend/classes/ListColumn.php b/modules/backend/classes/ListColumn.php index 8bfff5ae9..ea9d14346 100644 --- a/modules/backend/classes/ListColumn.php +++ b/modules/backend/classes/ListColumn.php @@ -56,10 +56,20 @@ class ListColumn public $cssClass; /** - * @var string Specify a format or style for the column value, such as a Date + * @var string Specify a format or style for the column value, such as a Date. */ public $format; + /** + * @var string Specifies a path for partial-type fields. + */ + public $path; + + /** + * @var array Raw field configuration. + */ + public $config; + /** * Constructor */ @@ -96,6 +106,7 @@ class ListColumn if (isset($config['select'])) $this->sqlSelect = $config['select']; if (isset($config['relation'])) $this->relation = $config['relation']; if (isset($config['format'])) $this->format = $config['format']; + if (isset($config['path'])) $this->path = $config['path']; return $config; } diff --git a/modules/backend/widgets/Lists.php b/modules/backend/widgets/Lists.php index 4a50cc2c1..a827669a0 100644 --- a/modules/backend/widgets/Lists.php +++ b/modules/backend/widgets/Lists.php @@ -598,6 +598,14 @@ class Lists extends WidgetBase // Value processing // + /** + * Process as boolean switch + */ + public function evalPartialTypeValue($value, $column) + { + return $this->controller->makePartial($column->path ?: $column->columnName, ['value' => $value, 'column' => $column]); + } + /** * Process as boolean switch */ diff --git a/modules/cms/classes/CmsObject.php b/modules/cms/classes/CmsObject.php index e5c43894f..ba64235a2 100644 --- a/modules/cms/classes/CmsObject.php +++ b/modules/cms/classes/CmsObject.php @@ -8,10 +8,10 @@ use Validator; use System\Classes\SystemException; use System\Classes\ApplicationException; use October\Rain\Support\ValidationException; -use Exception; -use RecursiveIteratorIterator; use RecursiveDirectoryIterator; +use RecursiveIteratorIterator; use ArrayAccess; +use Exception; /** * This is a base class for all CMS objects - content files, pages, partials and layouts.