Follow-up for #3545236: move triplicated logic into `ComponentTreeConfigEntityBase` to simplify future update paths targeting component trees
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3586216. -->
Reported by: [wim leers](https://www.drupal.org/user/99777)
Related to !993
>>>
<h3 id="overview">Overview</h3>
<p>While working on <span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/canvas/-/work_items/3582478" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/canvas/-/work_items/3582478</a></span>, I ended up needing to investigate where and whether there are differences between the 3 Canvas config entity types storing component trees.</p>
<p>This was made more difficult to assess because the same logic was duplicated in <em>three</em> places.</p>
<h3 id="proposed-resolution">Proposed resolution</h3>
<p>Remove the duplication; move as much out of <code>ContentTemplate|PageRegion|Pattern</code> into <code>ComponentTreeConfigEntityBase</code> as possible.</p>
<h3 id="ui-changes">User interface changes</h3>
<p>None.</p>
issue