Ejemplo n.º 1
0
 /**
  * 
  * @param AppInterface $app
  * @param Object $object
  * @param string $app_filter_attribute_alias
  * @return DataSheetInterface
  */
 protected function get_object_data_sheet(AppInterface $app, Object $object, $app_filter_attribute_alias)
 {
     $ds = DataSheetFactory::create_from_object($object);
     foreach ($object->get_attribute_group('~ALL')->get_attributes() as $attr) {
         $ds->get_columns()->add_from_expression($attr->get_alias());
     }
     $ds->add_filter_from_string($app_filter_attribute_alias, $app->get_uid());
     $ds->get_sorters()->add_from_string('CREATED_ON', 'ASC');
     $ds->get_sorters()->add_from_string($object->get_uid_alias(), 'ASC');
     $ds->data_read();
     return $ds;
 }
Ejemplo n.º 2
0
 /**
  * Returns the path to the
  * @param AbstractApp $app
  * @return string
  */
 public function get_path_to_app_relative(AppInterface $app = null, $base_path = '')
 {
     if (!$base_path) {
         $base_path = 'vendor' . DIRECTORY_SEPARATOR;
     }
     return $base_path . ($app ? $app->get_vendor() . DIRECTORY_SEPARATOR . str_replace($app->get_vendor() . NameResolver::NAMESPACE_SEPARATOR, '', $app->get_alias()) : '');
 }