You are here

protected function Package::inBundle in Features 8.3

Same name and namespace in other branches
  1. 8.4 src/Package.php \Drupal\features\Package::inBundle()

Return TRUE if the machine_name already has the bundle prefix.

Parameters

string $machine_name:

string $bundle_name:

Return value

bool

1 call to Package::inBundle()
Package::getFullName in src/Package.php
Return the full name of the package by prefixing it with bundle as needed.

File

src/Package.php, line 188

Class

Package
Defines a value object for storing package related data.

Namespace

Drupal\features

Code

protected function inBundle($machine_name, $bundle_name) {
  return strpos($machine_name, $bundle_name . '_') === 0;
}