public function getAllPlaceholders($parent = null, $sanitize = null, array $only = [], array $exclude = [])
    {
        if (isset($parent)) {
            list(, , $template) = $this->getParentPlaceholder($parent);
        }

        if (!isset($template)) {
            $template = $this;
        }
        if ($template === false) {
            if ($this->throwException) {
                if (is_array($parent)) {
                    $parent = implode('.', $parent);
                }
                throw new TemplateException("Unknown scope: {$parent}");
            }
            return [];
        }
        return $this->sanitize(ArrayHelper::only($template->placeholders, $only, $exclude), $sanitize);
    }