- ⌂ Content Type
- Methods
ContentType::supports_dimensions()
Return TRUE if the content type has dimension fields, and is therefore a type that can support variants.
Prototype
boolean supports_dimensions()
Return
TRUE if the content type has one or more dimension fields. Otherwise, FALSE.
An object must extend Content to have dimensions. Otherwise FALSE is always returned.
Example
$repo = \comand::repo();
$page = $repo->get_first('FROM WebPage LIMIT 1');
$can_have_variants = $page->Type->supports_dimensions();
Related
cObject::get_dimensions(), ContentTypeField::is_dimension_field()