src/EntityHelper/CustomFieldsGetSet.php
public static function getField($owningEntity, $key)
    {
        $entity = $owningEntity->getNonemptyCustomFields()->get($key);

        if (!$entity) {
            self::checkCustomFieldExists($owningEntity, $key);
        }

        return $entity;
    }
public static function getField($owningEntity, $key)
    {
        $entity = $owningEntity->getNonemptyCustomFields()->get($key);

        if (!$entity) {
            self::checkCustomFieldExists($owningEntity, $key);
        }

        return $entity;
    }
public static function getField ( $ owningEntity , $ key ) { $ entity = $ owningEntity -> getNonemptyCustomFields ( ) -> get ( $ key ) ; if ( ! $ entity ) { self :: checkCustomFieldExists ( $ owningEntity , $ key ) ; } return $ entity ; }
Gets the customField, null if the key does not exist.

@param object $owningEntity
@param string $key

@return CustomFieldBase|null
Gets the customField null if the key does not exist .