Mercator\Mapping::is_active PHP Метод

is_active() публичный Метод

Is the mapping active?
public is_active ( ) : boolean
Результат boolean
    public function is_active()
    {
        return $this->data->active == 1;
    }

Usage Example

Пример #1
0
 /**
  * Get cell value for the active column
  *
  * @param Mapping $mapping Current mapping item
  * @return string HTML for the cell
  */
 protected function column_active($mapping)
 {
     $active = $mapping->is_active();
     if ($active) {
         return esc_html__('Active', 'mercator');
     }
     return esc_html__('Inactive', 'mercator');
 }