Completed
Pull Request — master (#244)
by Łukasz
11:47
created

DeleteElement::delete()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
/**
4
 * (c) FSi sp. z o.o. <[email protected]>
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace FSi\Bundle\AdminBundle\Doctrine\Admin;
11
12
use FSi\Bundle\AdminBundle\Admin\CRUD\GenericDeleteElement;
13
14
abstract class DeleteElement extends GenericDeleteElement implements Element
15
{
16
    use DataIndexerElementImpl;
17
18
    /**
19
     * @inheritdoc
20
     */
21
    public function delete($object)
22
    {
23
        $this->getObjectManager()->remove($object);
24
        $this->getObjectManager()->flush();
25
    }
26
}
27