Elgg\Database\EntityTable::enable PHP Method

enable() public method

Enable an entity.
public enable ( integer $guid, boolean $recursive = true ) : boolean
$guid integer GUID of entity to enable
$recursive boolean Recursively enable all entities disabled with the entity?
return boolean
    public function enable($guid, $recursive = true)
    {
        // Override access only visible entities
        $old_access_status = access_get_show_hidden_status();
        access_show_hidden_entities(true);
        $result = false;
        $entity = get_entity($guid);
        if ($entity) {
            $result = $entity->enable($recursive);
        }
        access_show_hidden_entities($old_access_status);
        return $result;
    }