Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 45... Línea 45...
45
    public static function serializeBorderPart(BorderPart $borderPart): string
45
    public static function serializeBorderPart(BorderPart $borderPart): string
46
    {
46
    {
47
        $definition = 'fo:border-%s="%s"';
47
        $definition = 'fo:border-%s="%s"';
Línea 48... Línea 48...
48
 
48
 
49
        if (Border::STYLE_NONE === $borderPart->getStyle()) {
49
        if (Border::STYLE_NONE === $borderPart->getStyle()) {
50
            $borderPartDefinition = sprintf($definition, $borderPart->getName(), 'none');
50
            $borderPartDefinition = \sprintf($definition, $borderPart->getName(), 'none');
51
        } else {
51
        } else {
52
            $attributes = [
52
            $attributes = [
53
                self::widthMap[$borderPart->getWidth()],
53
                self::widthMap[$borderPart->getWidth()],
54
                self::styleMap[$borderPart->getStyle()],
54
                self::styleMap[$borderPart->getStyle()],
55
                '#'.$borderPart->getColor(),
55
                '#'.$borderPart->getColor(),
56
            ];
56
            ];
57
            $borderPartDefinition = sprintf($definition, $borderPart->getName(), implode(' ', $attributes));
57
            $borderPartDefinition = \sprintf($definition, $borderPart->getName(), implode(' ', $attributes));
Línea 58... Línea 58...
58
        }
58
        }
59
 
59
 
60
        return $borderPartDefinition;
60
        return $borderPartDefinition;