original_string: public static function createActionableRiverObject(ElggRiverItem $river) {
  
  		if (!$river instanceof ElggRiverItem) {
  			return false;
  		}
  
  		$object = $river->getObjectEntity();
  
  		$views = self::getActionableViews();
  		if (!in_array($river->view, $views)) {
  			return $object;
  		}
  
  		$access_id = $object->access_id;
  		if ($object instanceof ElggUser) {
  			$access_id = ACCESS_FRIENDS;
  		} else if ($object instanceof ElggGroup) {
  			$access_id = $object->group_acl;
  		}
  
  		$ia = elgg_set_ignore_access(true);
  
  		$object = new RiverObject();
  		$object->owner_guid = $river->subject_guid;
  		$object->container_guid = $object->guid;
  		$object->access_id = $access_id;
  		$object->river_id = $river->id;
  		$object->save();
  
  		elgg_set_ignore_access($ia);
  		
  		return $object;
  	}
code: public static function createActionableRiverObject(ElggRiverItem $river) {
  
  		if (!$river instanceof ElggRiverItem) {
  			return false;
  		}
  
  		$object = $river->getObjectEntity();
  
  		$views = self::getActionableViews();
  		if (!in_array($river->view, $views)) {
  			return $object;
  		}
  
  		$access_id = $object->access_id;
  		if ($object instanceof ElggUser) {
  			$access_id = ACCESS_FRIENDS;
  		} else if ($object instanceof ElggGroup) {
  			$access_id = $object->group_acl;
  		}
  
  		$ia = elgg_set_ignore_access(true);
  
  		$object = new RiverObject();
  		$object->owner_guid = $river->subject_guid;
  		$object->container_guid = $object->guid;
  		$object->access_id = $access_id;
  		$object->river_id = $river->id;
  		$object->save();
  
  		elgg_set_ignore_access($ia);
  		
  		return $object;
  	}
code_tokens: public static function createActionableRiverObject ( ElggRiverItem $ river ) { if ( ! $ river instanceof ElggRiverItem ) { return false ; } $ object = $ river -> getObjectEntity ( ) ; $ views = self :: getActionableViews ( ) ; if ( ! in_array ( $ river -> view , $ views ) ) { return $ object ; } $ access_id = $ object -> access_id ; if ( $ object instanceof ElggUser ) { $ access_id = ACCESS_FRIENDS ; } else if ( $ object instanceof ElggGroup ) { $ access_id = $ object -> group_acl ; } $ ia = elgg_set_ignore_access ( true ) ; $ object = new RiverObject ( ) ; $ object -> owner_guid = $ river -> subject_guid ; $ object -> container_guid = $ object -> guid ; $ object -> access_id = $ access_id ; $ object -> river_id = $ river -> id ; $ object -> save ( ) ; elgg_set_ignore_access ( $ ia ) ; return $ object ; }
docstring: Creates an object associated with a river item for commenting and other purposes
  This is a workaround for river items that do not have an object or have an object that is group or user
  
  @param ElggRiverItem $river River item
  @return RiverObject|false
docstring_tokens: Creates an object associated with a river item for commenting and other purposes This is a workaround for river items that do not have an object or have an object that is group or user