Back to AccessiblemediaField class

Method __get

public mixed
__get
(mixed $name)
Method to get certain otherwise inaccessible properties from the form field object.
Parameters
  • string $name The property name for which to get the value.
Returns
  • mixed The property value or null.
Since
  • 4.0.0

Method __get - Source code

/**
 * Method to get certain otherwise inaccessible properties from the form field object.
 *
 * @param   string  $name  The property name for which to get the value.
 *
 * @return  mixed  The property value or null.
 *
 * @since   4.0.0
 */
public function __get($name)
{
    switch ($name) {
        case 'directory':
        case 'preview':
        case 'previewHeight':
        case 'previewWidth':
            return $this->{$name};
    }
    return parent::__get($name);
}