Check if item is or is not empty, according to $empty param.

@param string $itemName
@param string $page
@param bool $shouldBeEmpty
430288
private function verifyContentsStatus(string $itemName, string $page, bool $shouldBeEmpty): void
    {
        $emptyContainerCellValue = '0';

        $contentsCount = PageObjectFactory::createPage($this->utilityContext, $page)
            ->adminList->table->getTableCellValue($itemName, $this->emptyHeaderMapping[$page]);

        $msg = '';
        if ($shouldBeEmpty) {
            $msg = ' non';
        }

        if (($contentsCount !== $emptyContainerCellValue) === $shouldBeEmpty) {
            Assert::fail(sprintf('No%s empty %s on the %s list.', $msg, $itemName, $page));
        }
    }
1277725
public function setItemsPerPage( $items_per_page )
	{
		if ( !is_int( $items_per_page ) )
		{
			trigger_error( 'Pagination setItemsPerPage: Items per page must be an integer.' );
			return false;
		}

		if ( $items_per_page <= 0 )
		{
			trigger_error( 'Pagination setItemsPerPage: Items per page must be a positive integer.' );
			return false;
		}

		$this->items_per_page = $items_per_page;
	}
729327
public function paginate($page = 1, $itemsPerPage = 20)
    {
        $query = $this->createAndFilterQueryBuilder($this->getEntityAlias());
        $query->setFirstResult(($page - 1) * $itemsPerPage);
        $query->setMaxResults($itemsPerPage);
        return new Paginator($query);
    }
1295688
public function checkForPhpNoticesOrWarnings($page = null)
	{
		if ($page)
		{
			$this->amOnPage($page);
		}

		$this->dontSeeInPageSource('Notice:');
		$this->dontSeeInPageSource('<b>Notice</b>:');
		$this->dontSeeInPageSource('Warning:');
		$this->dontSeeInPageSource('<b>Warning</b>:');
		$this->dontSeeInPageSource('Strict standards:');
		$this->dontSeeInPageSource('<b>Strict standards</b>:');
		$this->dontSeeInPageSource('The requested page can\'t be found');
	}
989277
public function has($itemName)
    {
        return array_key_exists($itemName, $this->store)
            && isset($this->store[$itemName]['lookupType']);
    }
122895
public function searchPosts($q, $page = 1)
    {
        if (!is_string($q) || empty($q)) {
            throw new IncorrectUsageException('Query must not be empty');
        }

        $this->checkPageNumber($page);

        return $this->adapter->get(sprintf('/search/posts/%s?page=%d', urlencode($q), $page));
    }
953505
public function validateNotEmpty($parameter, $value)
    {
        if (!empty($value)) {
            return true;
        }

        $message = sprintf('Parameter: %s cannot be empty.', $parameter);

        throw new AdldapException($message);
    }
457160
public function paginate(?int $itemsPerPage = null, array $options = [])
	{
		$count = $this->paginationCount();

		$pagination = static::getPaginationFactory()->create($count, $itemsPerPage, $options);

		if($count > 0)
		{
			$results = $this->limit($pagination->limit())->offset($pagination->offset())->all();
		}
		else
		{
			$results = $this->createResultSet([]);
		}

		$results->setPagination($pagination);

		return $results;
	}
702937
private function splitSpaceSeparatedStringAndCheckNoEmpties(
        string $paramName,
        $shouldBeString,
        string $errorTitle
    ): iterable {
        return $this->splitStringAndCheckNoEmpties($paramName, $shouldBeString, ' ', $errorTitle);
    }
1297265
function assertNoEmptyValues(data) {
  _.each(data, function (value) {
    if (!value) {
      throw new Error('Client: page cannot have empty values');
    }
  });

  _.each(references.listDeepObjects(data), assertNoEmptyValues);
}
98802
private void checkIfEmpty(){
        if(emptyView != null){
            emptyView.setVisibility(getItemCount() > 0 ? View.GONE : View.VISIBLE);
        }
    }
913127
public function hasChild($itemName, $childName)
    {
        $children = $this->getChildren($itemName);
        if (in_array($childName, $children)) {
            return true;
        }
        return false;
    }
189992
public function queryPage(int $requestedPage): bool
    {
        // clear
        $this->page = 0;
        $this->totalRecords = null;
        $this->recordset = null;
        // request
        $page = min($this->getTotalPages(), max(1, $requestedPage));
        $query = $this->dbal->sqlLimit($this->getQueryData(), $page, $this->getPageSize());
        $recordset = $this->dbal->queryRecordset($query);
        if (false === $recordset) {
            return false;
        }
        $this->page = $page;
        $this->recordset = $recordset;
        return true;
    }
491465
def checkAndRaise(pageNum, itemsPerPage):
        
        if pageNum < 1:
            raise ErrPaginationLimits(ErrPaginationLimits.ERR_PAGE_NUM)
        
        if itemsPerPage < Settings.itemsPerPageMin or itemsPerPage > Settings.itemsPerPageMax:
            raise ErrPaginationLimits(ErrPaginationLimits.ERR_ITEMS_PER_PAGE)
337947
function (item, pageConfig) {
            var templateCfg = {
                classpath : item.template
            };
            var args = item.args || [];
            var extraArg = {};
            if (item.contentId) {
                extraArg.contents = this._getPlaceholderContents(pageConfig, item.contentId);
            }
            args.push(extraArg);

            templateCfg.args = args;
            if (item.module) {
                var module = this._rootModule.getPageModule(this.currentPageId, item.module);
                templateCfg.moduleCtrl = module;
                this._modulesInPage.push(module);
            }
            if (item.data) {
                templateCfg.data = item.data;
            }
            return templateCfg;
        }
52264
public void assertNotEmpty(Collection<?> collection, String propertyName) {
        if (CollectionUtils.isNullOrEmpty(collection)) {
            problemReporter.report(new Problem(this, String.format("%s requires one or more items", propertyName)));
        }
    }
384683
protected function checkForMorePages()
	{
		$this->hasMore = count( $this->items ) > ( $this->perPage );

		$this->items = $this->items->slice( 0, $this->perPage );
	}