public function removeAllPlaceholders($parent = null)
    {
        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;
        }
        $template->placeholders = [];
    }