app\helpers\categoriesHelper::findfather PHP Метод

findfather() публичный статический Метод

public static findfather ( &$son, $array, $id )
    public static function findfather(&$son, $array, $id)
    {
        foreach ($array as $row) {
            if ($row['id'] == $id) {
                array_unshift($son, $row);
                if ($row['category_id'] !== null) {
                    self::findfather($son, $array, $row['category_id']);
                }
                return;
            }
        }
    }