setChildCount example


class TestCollectionWithSelfReference extends SerializationFixture
{
    /** * @return MediaFolderCollection|MediaFolderEntity */
    public function getInput(): EntityCollection|Entity
    {
        $parent = new MediaFolderEntity();
        $parent->setId('3e352be2d85846dd97529c0f6b544870');
        $parent->setChildCount(1);
        $parent->setUseParentConfiguration(false);
        $parent->setCreatedAt(new \DateTime('2012-08-15T00:00:00.000+00:00'));
        $parent->setUpdatedAt(new \DateTime('2017-11-21T11:25:34.000+00:00'));
        $parent->internalSetEntityData('media_folder', new FieldVisibility([]));

        $child = new MediaFolderEntity();
        $child->setId('5846dd97529c0f6b5448713e352be2d8');
        $child->setChildCount(1);
        $child->setUseParentConfiguration(true);
        $child->setParentId('3e352be2d85846dd97529c0f6b544870');
        $child->setCreatedAt(new \DateTime('2012-08-15T00:00:00.000+00:00'));
        
Home | Imprint | This part of the site doesn't use cookies.