You are here

public function EntityStructureWrapper::getIdentifier in Entity API 7

Returns the identifier of the data structure. If there is none, NULL is returned.

1 method overrides EntityStructureWrapper::getIdentifier()
EntityDrupalWrapper::getIdentifier in includes/entity.wrapper.inc
Returns the identifier of the wrapped entity.

File

includes/entity.wrapper.inc, line 564
Provides wrappers allowing easy usage of the entity metadata.

Class

EntityStructureWrapper
Provides a general wrapper for any data structure. For this to work the metadata has to be passed during construction.

Code

public function getIdentifier() {
  return isset($this->id) && $this
    ->dataAvailable() ? $this->id
    ->value() : NULL;
}