[ticket/416] Fix incorrect behavior discovered by tests

B3P-416
This commit is contained in:
Marc Alexander
2014-12-02 21:39:39 +01:00
parent ef22291efe
commit df9e5c47ea
3 changed files with 26 additions and 0 deletions

View File

@@ -139,6 +139,19 @@ class constraints_handler
return $this->check_module_already_exists($target_column, $module_class);
}
/**
* Check if module can be moved to desired column
*
* @param \board3\portal\modules\module_interface $module
* @param string $column Column string
*
* @return bool True if module can be moved, false if not
*/
public function can_add_module($module, $column)
{
return $module->get_allowed_columns() & $this->portal_columns->string_to_constant($this->portal_columns->number_to_string($column));
}
/**
* Check if module already exists in specified target column type
*