public function setData(array $data, $replaceTemplateVariables = true) : self
    {
        $this->assertDataIsWritable();

        if ($replaceTemplateVariables) {
            $data = $this->replaceTemplateVariables($data);
        }

        $this->_data = $data;

        return $this;
    }