Don't rely on set variables. use $this->get( 'mediaItems', array() ) instead