protected function destination()
{
switch ($this->type()) {
case 'plugin':
return $this->dir() . '/site/plugins/' . $this->name();
break;
case 'field':
return $this->dir() . '/site/fields/' . $this->name();
break;
case 'tag':
return $this->dir() . '/site/tags/' . $this->name() . '.php';
break;
case 'widget':
return $this->dir() . '/site/widgets/' . $this->name();
break;
}
}