You are here

public function WebformCardsManager::hasCards in Webform 8.5

Same name and namespace in other branches
  1. 6.x modules/webform_cards/src/WebformCardsManager.php \Drupal\webform_cards\WebformCardsManager::hasCards()

Determine if a webform has cards.

Parameters

\Drupal\webform\WebformInterface $webform: A webform.

Return value

bool TRUE if a webform has cards.

Overrides WebformCardsManagerInterface::hasCards

File

modules/webform_cards/src/WebformCardsManager.php, line 46

Class

WebformCardsManager
Manage webform cards.

Namespace

Drupal\webform_cards

Code

public function hasCards(WebformInterface $webform) {
  return $this
    ->getNumberOfCards($webform) > 0 ? TRUE : FALSE;
}