You are here

public function LingotekProfile::deleteAttribute in Lingotek Translation 7.7

2 calls to LingotekProfile::deleteAttribute()
LingotekProfile::setAttribute in lib/Drupal/lingotek/LingotekProfile.php
LingotekProfile::setNodeBased in lib/Drupal/lingotek/LingotekProfile.php

File

lib/Drupal/lingotek/LingotekProfile.php, line 512
Defines LingotekProfile

Class

LingotekProfile
A class wrapper for Lingotek Profiles

Code

public function deleteAttribute($attrib_name, $target_locale = NULL) {
  if ($target_locale) {
    if (isset($this->profile['target_language_overrides'][$target_locale][$attrib_name])) {
      unset($this->profile['target_language_overrides'][$target_locale][$attrib_name]);
    }
  }
  else {
    if (isset($this->profile[$attrib_name])) {
      unset($this->profile[$attrib_name]);
    }
  }
}