public function init() { parent::init(); if ($this->getFirstAncestor('SwatForm') !== null) { throw new SwatException('Uploader cannot reside inside a SwatForm'); } }