Retourne la liste des derniers statuts d'une page (inclut les posts)

@param  string $page_name    Nom de la page
@param  int $count           (optional) Nombre max de résultats (Défault: 100)
@return array                Tableau de statuts
179794
public function getLastStatusesFromPage($page_name, $count = 100, $fields = 'id,created_time,message,picture,full_picture')
  {
    try {
      $data = (new \Facebook\FacebookRequest(
        $this->session, 'GET', '/'.$page_name.'/feed?fields='.$fields.'&limit='.$count
      ))->execute()->getGraphObject()->getPropertyAsArray("data");
      return $data;
    } catch (\Exception $e) {
      return $this->debug_mode ? $e->getMessage() : null;
    }
    return null;
  }
308169
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllCashOnDeliveryPayments(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllCashOnDeliveryPayments();
        }
    }
86539
public function paginate($per_page = 15, $page = null, $page_name = 'page') {
        $page = $page ?: Paginator::resolveCurrentPage($page_name);

        $results = ($total = $this->count()) ? $this->forPage($page, $per_page) : $this->all();

        return $this->paginator($results, $total, $per_page, $page, [
            'path'      => Paginator::resolveCurrentPath(),
            'pageName'  => $page_name,
        ]);
    }
1211020
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllWishLists(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllWishLists();
        }
    }
766522
private function paginateRecords(ActiveQueryInterface $query, $pageNumber, $count)
    {
        $offset = ($pageNumber - 1) * $count;
        $limit = $count;

        return $query->offset($offset)->limit($limit);
    }
530748
function page($page, $limit = null, $offset = 0) {
		if ($page === null || $limit === null) {
			// retrieve all rows
			$this->num(':offset', $offset);
			$this->num(':count', PHP_INT_MAX);
		}
		else { // $page != null
			$this->num(':offset', $limit * ($page - 1) + $offset);
			$this->num(':count', $limit);
		}

		return $this;
	}
353559
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllCurrencies(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllCurrencies();
        }
    }
63135
private function hitCountQuery($page_name, string $page_parameter = ''): string
    {
        if ($page_name === '') {
            // index.php?ctype=gedcom
            $page_name      = 'index.php';
            $page_parameter = 'gedcom:' . $this->tree->id();
        } elseif ($page_name === 'index.php') {
            // index.php?ctype=user
            $user           = $this->user_service->findByIdentifier($page_parameter);
            $page_parameter = 'user:' . ($user ? $user->id() : Auth::id());
        }

        $count = (int) DB::table('hit_counter')
            ->where('gedcom_id', '=', $this->tree->id())
            ->where('page_name', '=', $page_name)
            ->where('page_parameter', '=', $page_parameter)
            ->value('page_count');

        return view(
            'statistics/hit-count',
            [
                'count' => $count,
            ]
        );
    }
1056067
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllTransactions(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllTransactions();
        }
    }
108758
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllPromotions(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllPromotions();
        }
    }
1155285
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllDiscountCoupons(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllDiscountCoupons();
        }
    }
635706
public function list_data( $is_valid = true, $per_page = null, $page = 1, $where = [], $orderby = null ) {
		/** @var \wpdb $wpdb */
		global $wpdb;
		$table      = $this->get_related_table_name();
		$limit      = $per_page;
		$page       = max( 1, $page );
		$table      = [
			[ $table, 't' ],
			[
				[ $wpdb->posts, 'p' ],
				'INNER JOIN',
				[
					't.post_id',
					'=',
					'p.ID',
				],
			],
		];
		$total      = $this->app->db->select_count( $table, null, $where );
		$total_page = isset( $per_page ) ? ceil( $total / $per_page ) : 1;
		$page       = min( $total_page, $page );
		$offset     = isset( $per_page ) && isset( $page ) ? $per_page * ( $page - 1 ) : null;
		if ( $is_valid ) {
			$where['p.post_status'] = 'publish';
		}

		$list = $this->app->db->select( $table, $where, null, $limit, $offset, $orderby );
		if ( empty( $list ) ) {
			return [
				'total'      => 0,
				'total_page' => 0,
				'page'       => $page,
				'data'       => [],
			];
		}

		$post_ids = $this->app->utility->array_pluck( $list, 'post_id' );
		$posts    = get_posts( [
			'include'   => $post_ids,
			'post_type' => $this->get_post_type(),
		] );
		$posts    = $this->app->utility->array_combine( $posts, 'ID' );

		return [
			'total'      => $total,
			'total_page' => $total_page,
			'page'       => $page,
			'data'       => array_map( function ( $d ) use ( $posts ) {
				return $this->filter_item( $this->set_post_data( $d, $posts[ $d['post_id'] ] ) );
			}, $list ),
		];
	}
538084
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllStripeGateways(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllStripeGateways();
        }
    }
529735
private static function getNumPages(int $limit, int $count): int
    {
        return (int) ceil($count / $limit);
    }
314628
protected function getListReportRoute($count = false)
    {
        $list = $this->route->getList();
        $this->prepareListReportRoute($list);
        $allowed = $this->getAllowedFiltersReportRoute();

        $this->filterList($list, $allowed, $this->query_filter);
        $this->sortList($list, $allowed, $this->query_filter, array('pattern' => 'asc'));

        if ($count) {
            return count($list);
        }

        $this->limitList($list, $this->data_limit);
        return $list;
    }
720910
final public function limit($offsetOrCount, $count = null)
    {
        $this->getQuery()->limit($offsetOrCount, $count);
        $this->pagedQuery = true;

        return $this;
    }
949077
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllDiscountPromotions(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllDiscountPromotions();
        }
    }