PHP Class Sulu\Bundle\CategoryBundle\Command\RecoverCommand

This command is fixing wrong left/right and depths (see -d) assignments of the categories tree.
Inheritance: extends Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand
Show file Open project: sulu/sulu

Protected Methods

Method Description
configure ( )
execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) Execute command.

Private Methods

Method Description
findCategoriesWithoutParents ( ) : integer Find number of categories that have no parent but depth > 0.
findInitialWrongDepthGap ( ) : integer Find number of categories where difference to parents depth > 1.
fixCategoriesWithoutParents ( ) Set every category where depth > 0 and has no parents to depth 0.
fixWrongDepthGap ( ) : integer | boolean Fix categories where difference to parents depth.
getCategoryRepository ( ) : Sulu\Bundle\CategoryBundle\Entity\CategoryRepositoryInterface
getEntityManager ( ) : EntityManager

Method Details

configure() protected method

protected configure ( )

execute() protected method

Execute command.
protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface