public function setUsages(FileManager $file_manager)
    {
        $usages = array();
        $usage_class = $file_manager->getUsagesClass();
        if ($usage_class != false) {
            /** @var mixed $usage_object */
            $usage_object = new $usage_class;
            $usages_result = $usage_object->returnUsages($this->getFilepath(true));
            if (!empty($usages_result)) {
                $usages = $usages_result;
            }
        }
        $this->usages = count($usages);
    }
public function setUsages(FileManager $file_manager)
    {
        $usages = array();
        $usage_class = $file_manager->getUsagesClass();
        if ($usage_class != false) {
            /** @var mixed $usage_object */
            $usage_object = new $usage_class;
            $usages_result = $usage_object->returnUsages($this->getFilepath(true));
            if (!empty($usages_result)) {
                $usages = $usages_result;
            }
        }
        $this->usages = count($usages);
    }
public function setUsages ( FileManager $ file_manager ) { $ usages = array ( ) ; $ usage_class = $ file_manager -> getUsagesClass ( ) ; if ( $ usage_class != false ) { /** @var mixed $usage_object */ $ usage_object = new $ usage_class ; $ usages_result = $ usage_object -> returnUsages ( $ this -> getFilepath ( true ) ) ; if ( ! empty ( $ usages_result ) ) { $ usages = $ usages_result ; } } $ this -> usages = count ( $ usages ) ; }
Set the locations where the file is used in an array.

This function requires a class that is set in the config with the function returnUsages.

@param FileManager $file_manager
Set the locations where the file is used in an array .