You are here

function _opigno_lms_install_specific_content_access in Opigno LMS 7

1 call to _opigno_lms_install_specific_content_access()
opigno_lms_install in ./opigno_lms.install
Implements hook_install().

File

./opigno_lms.install, line 1123
Install, update and uninstall functions for the Opigno LMS installation profile.

Code

function _opigno_lms_install_specific_content_access() {
  $types = array(
    'forum',
    'calendar_event',
    'notification',
  );
  foreach ($types as $type) {
    $defaults = array();
    foreach (_content_access_get_operations($type) as $op => $label) {
      $defaults[$op] = content_access_get_settings($op, $type);
    }
    if ($defaults['view'][0] == 1) {
      unset($defaults['view'][0]);
    }
    content_access_set_settings($defaults, $type);
  }
}