Working with Filter Data from MPP files in PHP

Aspose.Tasks - Reading Filter Definition Data

To read Filter Definition Data using Aspose.Tasks Java for PHP, call get_filter_definition_data method of FilterData module. Here you can see example code.

PHP Code

$project = new Project('test_tasks.mpp');
$task_filters = $project->getTaskFilters()->toList();
print "Task Filters Count: " . (string)$task_filters->size();
print "\nAll Tasks: " . (string)$task_filters->get(0)->getName();
print "\nTask Item: " . (string)$task_filters->get(0)->getFilterType();
print "\nTask Filters Show In Menu: " . (string)$task_filters->get(0)->getShowInMenu();
print "\nTask filter ShowRelatedSummaryRows: "  . (string)$task_filters->get(0)->getShowRelatedSummaryRows();
$rsc_filters = $project->getResourceFilters()->toList();
print "\nProject.ResourceFilters count: " .  (string)$rsc_filters->size();
print "\nResource Filter Item Type: Item.ResourceType: "  . (string)$rsc_filters->get(0)->getFilterType();
print "\nResource filter ShowInMenu"  . (string)$rsc_filters->get(0)->getShowInMenu();
print "\nResource filter ShowRelatedSummaryRows: " . (string)$rsc_filters->get(0)->getShowRelatedSummaryRows();

Download Running Code

Download Working with Filter Data from MPP files (Aspose.Tasks) from any of the below mentioned social coding sites: