File size: 467 Bytes
d2897cd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php

namespace Mautic\ApiBundle\Serializer\Exclusion;

/**
 * Only include the first level of a children/parent of an entity that relates to itself.
 */
class ParentChildrenExclusionStrategy extends FieldExclusionStrategy
{
    /**
     * @param int $level
     */
    public function __construct($level = 3)
    {
        parent::__construct(
            [
                'parent',
                'children',
            ],
            $level
        );
    }
}