本文整理汇总了PHP中Feature::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP Feature::delete方法的具体用法?PHP Feature::delete怎么用?PHP Feature::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Feature
的用法示例。
在下文中一共展示了Feature::delete方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: deleteSelection
/**
* Delete several objects from database
*
* @param array $selection Array with items to delete
* @return bool Deletion result
*/
public function deleteSelection($selection)
{
/* Also delete Attributes */
foreach ($selection as $value) {
$obj = new Feature($value);
if (!$obj->delete()) {
return false;
}
}
return true;
}
示例2: deleteFeature
/**
* AJAX action for deleting feature.
*/
public function deleteFeature()
{
$feature = new Feature($_REQUEST['id']);
$feature->delete();
//Since delete doesn't return anything, this will check for success
return $feature->getId() == NULL;
}
示例3: delete
public function delete($f3, $params)
{
$obj = new Feature($this->db);
echo json_encode($obj->delete($params["FeatureID"]));
}
示例4: deletePrestashopDefaultFeatures
public function deletePrestashopDefaultFeatures()
{
$all_features = Feature::getFeatures($this->context->language->id);
foreach ($all_features as $ftr_k => $ftr_v) {
$obj_feature = new Feature($ftr_v['id_feature']);
$obj_feature->delete();
}
return true;
}