/**
 * Method to set state variables.
 *
 * @param   string  $property  The name of the property
 * @param   mixed   $value     The value of the property to set or null
 *
 * @return  mixed  The previous value of the property or null if not set
 *
 * @since   4.0.0
 */
public function setState($property, $value = null)
{
    if ($this->state === null) {
        $this->state = new CMSObject();
    }
    return $this->state->set($property, $value);
}