src/Common/Console/Seed/Base.php
protected function randomId($sModel, $sProvider, $aData = [])
    {
        $oModel   = Factory::model($sModel, $sProvider);
        $aResults = $oModel->getAll(0, 1, $aData + ['sort' => [['id', 'random']]]);
        $oRow     = reset($aResults);

        return $oRow ? $oRow->id : null;
    }
protected function randomId($sModel, $sProvider, $aData = [])
    {
        $oModel   = Factory::model($sModel, $sProvider);
        $aResults = $oModel->getAll(0, 1, $aData + ['sort' => [['id', 'random']]]);
        $oRow     = reset($aResults);

        return $oRow ? $oRow->id : null;
    }
protected function randomId ( $ sModel , $ sProvider , $ aData = [ ] ) { $ oModel = Factory :: model ( $ sModel , $ sProvider ) ; $ aResults = $ oModel -> getAll ( 0 , 1 , $ aData + [ 'sort' => [ [ 'id' , 'random' ] ] ] ) ; $ oRow = reset ( $ aResults ) ; return $ oRow ? $ oRow -> id : null ; }
Returns a random ID from a particular model

@param string $sModel    The model to use
@param string $sProvider The model's provider
@param array  $aData     Any data to pass to the model

@return int|null
Returns a random ID from a particular model