Seotamic checks class types with get_class. This outputs a string of the current class. This fails because it's not this exact class, just an instance of it.
if (get_class($this->field->parent()) === "Statamic\Entries\Entry") {
If we would use instanceof instead, everything would continue to work as expected but you'll be able to still extend Statamics classes.
if ($this->field->parent() instanceof \Statamic\Entries\Entry) {
We re-bind some of statamics content classes, like referred to in the documentation: https://statamic.dev/extending/repositories#custom-data-classes
Seotamic checks class types with
get_class
. This outputs a string of the current class. This fails because it's not this exact class, just an instance of it.If we would use
instanceof
instead, everything would continue to work as expected but you'll be able to still extend Statamics classes.