protected function getManialinksToDisplay()
    {
        foreach ($this->displayQueu as $groupName => $manialinks) {
            foreach ($manialinks as $factoryId => $manialink) {
                $logins = $manialink->getUserGroup()->getLogins();

                $this->displayeds[$groupName][$factoryId] = $manialink;
                if (!empty($logins)) {
                    yield ['logins' => $logins, 'ml' => $manialink->getXml(), "timeout" => $manialink->getTimeout()];
                }
            }
        }

        foreach ($this->individualQueu as $manialinks) {
            // Fetch all logins
            $logins = [];
            $lastManialink = null;
            foreach ($manialinks as $login => $manialink) {
                $logins[] = $login;
                $lastManialink = $manialink;
            }

            if ($lastManialink) {
                $xml = $manialink->getXml();
                yield ['logins' => $logins, 'ml' => $xml, "timeout" => $manialink->getTimeout()];
            }
        }

        foreach ($this->hideQueu as $manialinks) {
            foreach ($manialinks as $manialink) {
                $id = $manialink->getId();
                $manialink->destroy();

                $logins = $manialink->getUserGroup()->getLogins();
                $logins = array_diff($logins, $this->disconnectedLogins);

                if (!empty($logins)) {
                    yield ['logins' => $logins, 'ml' => '<manialink id="'.$id.'" />', "timeout" => 0];
                }
            }
        }

        foreach ($this->hideIndividualQueu as $id => $manialinks) {
            // Fetch all logins.
            $logins = [];
            $lastManialink = null;
            foreach ($manialinks as $login => $manialink) {
                if (!in_array($login, $this->disconnectedLogins)) {
                    $logins[] = $login;
                    $lastManialink = $manialink;
                }
            }

            if ($lastManialink) {
                // Manialink is not destroyed just not shown at a particular user that left the group.
                yield ['logins' => $logins, 'ml' => '<manialink id="'.$lastManialink->getId().'" />', "timeout" => 0];
            }
        }
    }
protected function getManialinksToDisplay()
    {
        foreach ($this->displayQueu as $groupName => $manialinks) {
            foreach ($manialinks as $factoryId => $manialink) {
                $logins = $manialink->getUserGroup()->getLogins();

                $this->displayeds[$groupName][$factoryId] = $manialink;
                if (!empty($logins)) {
                    yield ['logins' => $logins, 'ml' => $manialink->getXml(), "timeout" => $manialink->getTimeout()];
                }
            }
        }

        foreach ($this->individualQueu as $manialinks) {
            // Fetch all logins
            $logins = [];
            $lastManialink = null;
            foreach ($manialinks as $login => $manialink) {
                $logins[] = $login;
                $lastManialink = $manialink;
            }

            if ($lastManialink) {
                $xml = $manialink->getXml();
                yield ['logins' => $logins, 'ml' => $xml, "timeout" => $manialink->getTimeout()];
            }
        }

        foreach ($this->hideQueu as $manialinks) {
            foreach ($manialinks as $manialink) {
                $id = $manialink->getId();
                $manialink->destroy();

                $logins = $manialink->getUserGroup()->getLogins();
                $logins = array_diff($logins, $this->disconnectedLogins);

                if (!empty($logins)) {
                    yield ['logins' => $logins, 'ml' => '<manialink id="'.$id.'" />', "timeout" => 0];
                }
            }
        }

        foreach ($this->hideIndividualQueu as $id => $manialinks) {
            // Fetch all logins.
            $logins = [];
            $lastManialink = null;
            foreach ($manialinks as $login => $manialink) {
                if (!in_array($login, $this->disconnectedLogins)) {
                    $logins[] = $login;
                    $lastManialink = $manialink;
                }
            }

            if ($lastManialink) {
                // Manialink is not destroyed just not shown at a particular user that left the group.
                yield ['logins' => $logins, 'ml' => '<manialink id="'.$lastManialink->getId().'" />', "timeout" => 0];
            }
        }
    }
protected function getManialinksToDisplay ( ) { foreach ( $ this -> displayQueu as $ groupName => $ manialinks ) { foreach ( $ manialinks as $ factoryId => $ manialink ) { $ logins = $ manialink -> getUserGroup ( ) -> getLogins ( ) ; $ this -> displayeds [ $ groupName ] [ $ factoryId ] = $ manialink ; if ( ! empty ( $ logins ) ) { yield [ 'logins' => $ logins , 'ml' => $ manialink -> getXml ( ) , "timeout" => $ manialink -> getTimeout ( ) ] ; } } } foreach ( $ this -> individualQueu as $ manialinks ) { // Fetch all logins $ logins = [ ] ; $ lastManialink = null ; foreach ( $ manialinks as $ login => $ manialink ) { $ logins [ ] = $ login ; $ lastManialink = $ manialink ; } if ( $ lastManialink ) { $ xml = $ manialink -> getXml ( ) ; yield [ 'logins' => $ logins , 'ml' => $ xml , "timeout" => $ manialink -> getTimeout ( ) ] ; } } foreach ( $ this -> hideQueu as $ manialinks ) { foreach ( $ manialinks as $ manialink ) { $ id = $ manialink -> getId ( ) ; $ manialink -> destroy ( ) ; $ logins = $ manialink -> getUserGroup ( ) -> getLogins ( ) ; $ logins = array_diff ( $ logins , $ this -> disconnectedLogins ) ; if ( ! empty ( $ logins ) ) { yield [ 'logins' => $ logins , 'ml' => '<manialink id="' . $ id . '" />' , "timeout" => 0 ] ; } } } foreach ( $ this -> hideIndividualQueu as $ id => $ manialinks ) { // Fetch all logins. $ logins = [ ] ; $ lastManialink = null ; foreach ( $ manialinks as $ login => $ manialink ) { if ( ! in_array ( $ login , $ this -> disconnectedLogins ) ) { $ logins [ ] = $ login ; $ lastManialink = $ manialink ; } } if ( $ lastManialink ) { // Manialink is not destroyed just not shown at a particular user that left the group. yield [ 'logins' => $ logins , 'ml' => '<manialink id="' . $ lastManialink -> getId ( ) . '" />' , "timeout" => 0 ] ; } } }
Get list of all manialinks that needs to be displayed

@return \Generator
Get list of all manialinks that needs to be displayed