public static function fromBlueprint(Blueprint $blueprint, $title, array $arguments = [], $type = self::TYPE_MAIN, $fillFromToolbar = 'section') {
        if($title instanceof FieldSet) {
            $title = $arguments['model']->getAttribute($title->getTitleFieldName());
        } else {
            if(!is_string($title)) {
                throw new \InvalidArgumentException('$title must be either a string or an instance of \Oxygen\Core\Form\FieldSet');
            }
        }

        $object = new static(
            $title,
            $arguments,
            $type
        );

        // sets a prefix to all the routes in the toolbar
        $object->getToolbar()->setPrefix($blueprint->getRouteName());

        // fills the toolbar with buttons from the blueprint
        $object->getToolbar()->fillFromBlueprint($blueprint, $fillFromToolbar);

        return $object;
    }