You are here

function FileStyles::getObject in Styles 7.2

Override the getObject() method to account for media fields that store their data in a sub-property rather than the field itself.

Overrides StylesDefault::getObject

3 calls to FileStyles::getObject()
FileStyles::getUri in contrib/file_styles/includes/styles/FileStyles.inc
FileStyles::override in contrib/file_styles/includes/styles/FileStyles.inc
FileStyles::render in contrib/file_styles/includes/styles/FileStyles.inc
Override the render function to always display a thumbnail in the wysiwyg.

File

contrib/file_styles/includes/styles/FileStyles.inc, line 236
styles/contrib/file_styles/includes/styles/FileStyles.inc Styles definitions for file styles.

Class

FileStyles
@file styles/contrib/file_styles/includes/styles/FileStyles.inc Styles definitions for file styles.

Code

function getObject() {
  $object = $this
    ->get('object');
  return !empty($object->file) ? $object->file : $object;
}